Normalization Solved Case Study
Normalization Solved Case Study
Unnormalized data given: Item_code Present_stock Item_name Purchase_order_no Sales_invoice_no Purchase_date 1NF: All fields in a record should be atomic and single valued. There are no repeating groups of items. Assumptions: a) e are solving for one particular purchase order only! ") e are not considering present stock of all com"ined items "ut present stock of each individual item! Repeating Item_code #P$) Item_name Unit_of_measure %ate purchase_order_no #&$) sales_invoice_no #&$) present_stock Non-repeating purchase_order_no #P$) purchase__date purchase_qty sales_qty sales_date sales_invoice_no #P$) purchase_qty sales_date sales_qty unit_of_measure rate
2NF: All non- e! attributes should be full! functionall! dependent on entire primar! e!. "#o after appl!ing 2nd rule $e get the tables out of repeating and nonrepeating groups. %ut still it is not normalized data.&
'
Item Item_code #P$) Item_name Unit_of_measure %ate Present_stock purchase_order_no #&$) sales_invoice_no #&$) 'NF:
No non- e! attribute should determine other non- e! attribute. &or ()& you can *rite the ta"les as *ritten for +)&! Since it is simple case study, *e get the normalized data in +)& only! e -ust need to check it "y applying ()& rule! #.enerally *e consider that after applying (rd rule, the data is in normalized form! /ut in some kind of data0cases it is not '112 normalized! So then *e can apply /3)& rule! .enerally it is not needed! It is fine up to ()& only) %(NF"%o!ce (odd Normal Form&: No non- e! attribute should determine other non- e! attribute e)cept candidate e!. In the realational model candidate e! of arelation varia"le is a set of attri"utes of that relvar such that '! at all times it holds in the relation assigned to that varia"le that there are no t*o distinct tuples *ith the same values for these attri"utes and +! 4here is not a proper su"set of this set of attri"utes for *hich #') holds! Since a superkey is defined as a set of attri"utes for *hich #') holds, *e can also define a candidate key as a minimal superkey, i!e! a superkey of *hich no proper su"set is also a super key!
+