Thursday, January 26, 2012
perkthim 3
Second Normal Form - 2NF
The schema presented in First Normal Form 1NF can be further improved to the second normal form 2NF as shown below:
Recall that an entity type is 2NF when it is 1NF and all of its non-key attributes (columns) are fully dependent on its primary key. This is definitely not the case with OrderItem1NF - item information in OrderItem1NF does not depend on an order for that item. For example, if customer A orders 1 computer and customer B orders 2 printers, the fact that the items are called "computer" and "printer" and that the unit prices are $999 and $399 does not depend on the order and are constant. Item name and price depends on the concept of the item and not the concept of an order, and therefore should not be stored in the OrderItem2F table but rather in the new table Item2F. OrderItem2F retains the TotalPrice as this is a calculated column.
Subscribe to:
Post Comments (Atom)

No comments:
Post a Comment