Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Relation

Author  Topic 

Borkoff
Starting Member

1 Post

Posted - 2010-06-16 : 07:26:27
Hi! I need some help please!

I have to create a DB that has to be normalized to 3NF. I have a table 'Products' that contains info about all the products -
product_ID,
product_name,
quanitity (left in warehouse),
procurement_price,
sales_price.
And I have TWO more tables that contain info about transactions - 'Procured products' and 'Sold_products' tables.
In both these tables I have a field with number of procured and sold products.
My question is - is it possible or do i have to link the product_quantity in warehouse with the quantity of procured_products and the sold_products so my DB would meet 3NF?

Devart
Posting Yak Master

102 Posts

Posted - 2010-06-18 : 06:21:53
In your case Procured products and Sold_products tables cannon be linked directly to quantity field of Products table, because the latter contains the result of all transactions applied sequentially. Typically, such field like Products.quantity is updated using the trigger.

Table Products is in 3NF. Tables Procured products and Sold_products should be normalized separately.


Devart,
Database tools for SQL Server
http://www.devart.com/dbforge/sql
Go to Top of Page
   

- Advertisement -