Normal Forms data modeling

-1

I have a excell file with PRODUCT AND ORDER information. It is out of the normal way because the information is all in one table.

I'm uploading% of this information to a database in SQLServer. The first table in the image shows how it is currently. The other two as they should be after normalization. How do I associate the new field created in the products table (ProductCode) with the order? Since in the first denormalized table there is no information for this field?

    
asked by anonymous 16.01.2015 / 16:40

1 answer

1

Suggestion how to proceed:

  • Make bulk insert of the entire excel file, including the Product Description for a bd table.
  • Create the Product table with the product descriptions and then add primary key .
  • Create the Product Code field in the table with the product description and the other fields.
  • Update the Product Code field using the Product Description of the two tables to make the association ( join ).
  • Delete the Product Description field from the table and just leave it in the table product.
  • I know it's not good practice to do join with string fields, but as it's only with palliative, I think you will have no problems.

        
    16.01.2015 / 17:53