Search Results

Search found 2 results on 1 pages for 'haghpanah'.

Page 1/1 | 1 

  • conceptually different entities with a few similar properties should be stored in one table or more?

    - by Haghpanah
    Assume A and B are conceptually different entities that have a few similar properties and of course their own specific properties. In database design, should I put those two entities in one big aggregated table or two respectively designed tables. For instance, I have two types of payment; Online-payment and Manual-payment with following definition, TABLE [OnlinePayments] ( [ID] [uniqueidentifier], [UserID] [uniqueidentifier], [TrackingCode] [nvarchar](32), [ReferingCode] [nvarchar](32), [BankingAccID] [uniqueidentifier], [Status] [int], [Amount] [money], [Comments] [nvarchar](768), [CreatedAt] [datetime], [ShopingCartID] [uniqueidentifier], ) And TABLE [ManualPayments] ( [ID] [uniqueidentifier], [UserID] [uniqueidentifier], [BankingAccID] [uniqueidentifier], [BankingOrgID] [uniqueidentifier], [BranchName] [nvarchar](64), [BranchCode] [nvarchar](16), [Amount] [money], [SlipNumber] [nvarchar](64), [SlipImage] [image], [PaidAt] [datetime], [Comments] [nvarchar](768), [CreatedAt] [datetime], [IsApproved] [bit], [ApprovedByID] [uniqueidentifier], ) One of my friends told me that creating two distinct tables for such similar entities is not a well design method and they should be put in one single table for the sake of performance and ease of data manipulations. I’m now wondering what to do? What is the best practice in such a case?

    Read the article

  • How to prevent DIVs from sliding over each other

    - by Haghpanah
    I’m going to use DIV-based layout instead of table-based to reduce amount of markups and speed up page loading, however I’ve found it too much tricky as I’m not CSS guru. I use following CSS class to simulate rows of a table containing one column for label and one for textbox. .FormItem { margin-left: auto; margin-right: auto; width: 604px; min-height: 36px; } .ItemLabel { float: left; width: 120px; padding: 3px 1px 1px 1px; text-align: right; } .ItemTextBox { float: right; width: 480px; padding: 1px 1px 1px 1px; text-align: left; } , <div class="FormItem"> <div class="ItemLabel"> <asp:Label ID="lblName" runat="server" Text="Name :"></asp:Label> </div> <div class="ItemTextBox"> <asp:TextBox ID="txtName" runat="server"></asp:TextBox> <p><span>User Name</span></p> </div> </div> <div class="FormItem"> <div class="ItemLabel"> <asp:Label ID="lblComments" runat="server" Text="Comments :"></asp:Label> </div> <div class="ItemTextBox"> <asp:TextBox ID="txtComments" runat="server"></asp:TextBox> <p><span>(optional)Comments</span></p> </div> </div> These styles work fine if the height of ItemData DIVs are less than or equal to FormItem DIVs min-height. If ItemData DIVs height gets more than FormItem height then ItemText DIVs start sliding over FormItem DIVs to and ItemText and ItemData are no longer aligned. For example the following markups… <div class="FormItem"> <div class="ItemLabel"> <asp:Label ID="lblName" runat="server" Text="Name :"></asp:Label> </div> <div class="ItemTextBox"> <asp:TextBox ID="txtName" runat="server"></asp:TextBox> <p><span>User Name</span></p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> </div> </div> <div class="FormLabel"> <div class="ItemText"> <asp:Label ID="lblComments" runat="server" Text="Comments :"></asp:Label> </div> <div class="ItemTextBox"> <asp:TextBox ID="txtComments" runat="server"></asp:TextBox> <p><span>(optional)Comments</span></p> </div> </div> I've tried several CSS attributes such as; position, float, clear… but I can not correct the problem. I’ll be appreciated for any help.

    Read the article

1