Database Table Design

database-designnormalizationschema

I would like to ask couple of questions regarding my schema table design.

I have the following data coming from an external database where I do not have any control over it.

PROD_NO  PROD_NAME         COMPANY_ID   COMPANY_NAME    PROD_MARK_NO    PROD_CATALOGUE  PROD_TYPE   PROUDCT_EXPIRY_DATE
MXTP     PLANT_FERTILIZER   BRZL-98     XYZ CO.         MX-FRT          FERT-1          PERISH-01   30-09-2018 
RXLG     FARM_FERTILIZER    BRZL-102    ABC CO.         RX-FRT          FERT-6          PERISH-06   31-05-2016

User would like to verify the product information and add two more fields

  1. Verify_date
  2. Comments

How could I normalize the data I receive and put into relational tables?

PROD_NO, COMPANY_ID, PROD_MARK_NO,PROD_CATALOGUE and PROD_TYPE will be always unique.

Best Answer

This schema would make sense to me:

tblCompany
(
  Company_ID  PK
  Company_Name
)

tblProduct
(
  Prod_No  PK
  Company_ID  FK_tblCompany_CompanyID
  Prod_Name
  Prod_Mark_No
  Prod_Catalogue
  Prod_Type
  Prod_Expiry_Date
  Prod_Verify_Date
  Prod_Comments
)

You could have separate tables for product type and product catalogue to get to 3NF but that's a decision for you to make depending on the amount of different values those columns could have and the way in which this data will be accessed (OLTP only or heavy reporting used here too?).