CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2003
    Posts
    9

    DB Normalisation

    Dear Friends

    My ProductMaster table contains the attributes like ProductCode, ProductName, PackSize,PackType, Price, ManufacturingDate (MFD). The problem is MFD is changing everyday. In this case how I normalise this table. Shall I keep different ProductCode or same ProductCode. (I have a lot of products producing each and everyday). if i keep different productCode i have to make 365 entries per product.

    i have to track a lot of reports like sales,sales return, purchase and purchase return based on this MFD date. Tell me how i normalise this table.

    it is like products are keeping in Medical shops on the basis of batchNo

    thanks
    bobbytom

  2. #2
    Join Date
    Aug 2000
    Location
    Essex, Uk
    Posts
    1,214
    Table1 let's call it product.
    Masterkey=productcode,
    Normal fields=productname,packsize,packtype,price

    Table1 assumes for a given product that the packsize and packtype are always the same. If not you may need to introduce a Pack table and also move these fields into table 2.

    Table2 lets call it Batch's (if there is a batch code available)
    Masterkey=BatchCode
    Normal fields=ManufacturingCode, Product code

    Table2 (no batch code available)
    Masterkey= ManufacturingCode,ProductCode.
    If you find my answers helpful, dont forget to rate me

  3. #3
    Join Date
    Jun 2001
    Location
    Mi
    Posts
    1,249
    Split out the ProductCode and the MFD to another table and set a 1-n relationship.

  4. #4
    Join Date
    May 2000
    Location
    KY, USA
    Posts
    18,652
    [Merged threads]

  5. #5
    Join Date
    Dec 2003
    Posts
    9
    Mr. Bill

    In this case which code i has to select when i make purchase entry or sales entry. i want to select only one code in the grid

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured