Hire đ 8617697112 Chamba Call Girls Service Call Girls Agency
Â
Database Management System
1. Database Management System Keys and Normalization June 2, 2009 Varun Arora, SICSR 2007-'09 By: Varun Arora [email_address] www.varunarora.in
2.
3.
4.
5.
6.
7.
8. Sample ER (Purchase Order) June 2, 2009 Varun Arora, SICSR 2007-'09 Contains Purchase Order Master Purchase Order Detail Po_no (PK) Po_dt Po_amt Supp_cd âŠâŠ . Po_no (FK) Item_cd (FK) quantity Unit_price âŠâŠ . Po_no Po_dt Supp_cd Po_amt Po_no Item_cd quantity Unit_price 1 M
9.
10.
11.
12.
13.
14. Functional Dependency..Example June 2, 2009 Varun Arora, SICSR 2007-'09 In this table the values in the attributes âNameâ â Marksâ and â%ageâ are functionally dependent on the values in the attribute âRoll Noâ because if the value of âRoll Noâ changes so does the value of the other attributes changes. Roll No Name Marks %age R001 Raj 300 50% R002 Raj 360 60% R003 Rahul 420 70%
15.
16.
17. 1 st Normal Form - Example June 2, 2009 Varun Arora, SICSR 2007-'09 Denormalized Data consisting of Attributes with more than one values. Ecode Ename Ecity Ephone E001 Raj Ahmedabad Pune Mumbai 2344567 2344568 E002 Rahul Udaipur 2334445 2334455 E003 Ramesh Jaipur 2345678
18. 1 st Normal Form - Example June 2, 2009 Varun Arora, SICSR 2007-'09 Attributes Containing Atomic Values ECode Ename Ecity Ephone E001 Raj Ahmedabad 2344567 E001 Raj Pune 2344568 E001 Raj Mumbai E002 Rahul Udaipur 2334445 E002 Rahul Udaipur 2334455 E003 Ramesh Jaipur 2345678
19.
20. 2 nd Normal Form - Example June 2, 2009 Varun Arora, SICSR 2007-'09 Attributes which decide the uniqueness of the data but the absence of one makes the Dependency partial not absent. Contd.. Ecode Ename Dept PrjCd PrjHrs E001 Raj MKT P001 30 E002 Rahul FIN P002 40 E003 Ramesh FIN P002 40 E004 Mahesh MKT P003 40
21. 2 nd Normal Form - Example June 2, 2009 Varun Arora, SICSR 2007-'09 Full Functional Dependency on the PrjCode Attribute Full Functional Dependency on the ECode Attribute Ecode Ename Dept E001 Raj MKT E002 Rahul FIN E003 Ramesh FIN E004 Mahesh MKT PrjCode Ecode PrjHrs P001 E001 30 P002 E002 40 P002 E003 40 P003 E004 40
22.
23. June 2, 2009 Varun Arora, SICSR 2007-'09 This non key attribute is dependent on the non key attribute Drug Admin so it is not in the Third Normal Form. Source â www.sims.berkely.edu
24. June 2, 2009 Varun Arora, SICSR 2007-'09 Here all the non key attributes are full functionally dependent on a single key attribute. Source â www.sims.berkely.edu
25. June 2, 2009 Varun Arora, SICSR 2007-'09 Here all the non key attributes are full functionally dependent on a single key attribute. Source â www.sims.berkely.edu
26.
27. June 2, 2009 Varun Arora, SICSR 2007-'09 Source â www.sims.berkely.edu In this relation there is a single attribute Patient# which is a Candidate Key and it serves as the primary key also. There is no other attribute Which can serve as the Candidate key. And along with this the attribute is also disjoint
30. June 2, 2009 Varun Arora, SICSR 2007-'09 The Relations are in the 3NF State but to extract The effect of a certain Drug a join has to be Formed on the two Relations which an be time Consuming. Source â www.sims.berkely.edu
34. June 2, 2009 Varun Arora, SICSR 2007-'09 Un-Normalized Data Normalized Data Normalization tests And Techniques Lower Level of Normalization Normalized Data + Redundancy A Final Note âŠ..