SlideShare ist ein Scribd-Unternehmen logo
1 von 34
Database Management System Keys  and Normalization June 2, 2009 Varun Arora, SICSR 2007-'09 By: Varun Arora [email_address] www.varunarora.in
Keys ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],June 2, 2009 Varun Arora, SICSR 2007-'09
Candidate Keys ,[object Object],[object Object],June 2, 2009 Varun Arora, SICSR 2007-'09
Super Keys ,[object Object],[object Object],June 2, 2009 Varun Arora, SICSR 2007-'09
Primary Key ,[object Object],[object Object],June 2, 2009 Varun Arora, SICSR 2007-'09
Foreign Key ,[object Object],[object Object],June 2, 2009 Varun Arora, SICSR 2007-'09
Keys - Purpose ,[object Object],[object Object],[object Object],[object Object],June 2, 2009 Varun Arora, SICSR 2007-'09
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
Extended E-R Features ,[object Object],[object Object],[object Object],June 2, 2009 Varun Arora, SICSR 2007-'09
Specialization ,[object Object],[object Object],June 2, 2009 Varun Arora, SICSR 2007-'09
Generalization ,[object Object],[object Object],June 2, 2009 Varun Arora, SICSR 2007-'09
Normalization..Topics ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],June 2, 2009 Varun Arora, SICSR 2007-'09
Functional Dependency ,[object Object],[object Object],June 2, 2009 Varun Arora, SICSR 2007-'09
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%
Normalization ,[object Object],[object Object],June 2, 2009 Varun Arora, SICSR 2007-'09
1 st  Normal Form ,[object Object],[object Object],June 2, 2009 Varun Arora, SICSR 2007-'09
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
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
2 nd  Normal Form ,[object Object],[object Object],June 2, 2009 Varun Arora, SICSR 2007-'09
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
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
Third Normal Form ,[object Object],[object Object],[object Object],June 2, 2009 Varun Arora, SICSR 2007-'09
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
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
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
Boyce Codd Normal Form ,[object Object],[object Object],[object Object],[object Object],[object Object],June 2, 2009 Varun Arora, SICSR 2007-'09
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
June 2, 2009 Varun Arora, SICSR 2007-'09 Source – www.sims.berkely.edu
Denormalization ,[object Object],[object Object],[object Object],June 2, 2009 Varun Arora, SICSR 2007-'09
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
Denormalized Relation. June 2, 2009 Varun Arora, SICSR 2007-'09 FD1 FD2 Source – www.sims.berkely.edu Relation  Transition 3NF->2NF
Importance of Normalization ,[object Object],[object Object],[object Object],[object Object],[object Object],June 2, 2009 Varun Arora, SICSR 2007-'09
Importance of Denormalization ,[object Object],[object Object],[object Object],[object Object],June 2, 2009 Varun Arora, SICSR 2007-'09
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 
..

Weitere Àhnliche Inhalte

Andere mochten auch

Entity relationship diagram for dummies
Entity relationship diagram for dummiesEntity relationship diagram for dummies
Entity relationship diagram for dummieswww.myassignmenthelp.net
 
Database design & Normalization (1NF, 2NF, 3NF)
Database design & Normalization (1NF, 2NF, 3NF)Database design & Normalization (1NF, 2NF, 3NF)
Database design & Normalization (1NF, 2NF, 3NF)Jargalsaikhan Alyeksandr
 
DBMS - Normalization
DBMS - NormalizationDBMS - Normalization
DBMS - NormalizationJitendra Tomar
 
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NFDatabase Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NFOum Saokosal
 
Normalization i i
Normalization   i iNormalization   i i
Normalization i iGagan Deep
 
Importance of Normalization
Importance of NormalizationImportance of Normalization
Importance of NormalizationShwe Yee
 
Mysql database
Mysql databaseMysql database
Mysql databasemayank78634
 
RDBMS ERD
RDBMS ERDRDBMS ERD
RDBMS ERDSarmad Ali
 
Entity Relationship Diagram
Entity Relationship DiagramEntity Relationship Diagram
Entity Relationship DiagramSiti Ismail
 
Database Concept - Normalization (1NF, 2NF, 3NF)
Database Concept - Normalization (1NF, 2NF, 3NF)Database Concept - Normalization (1NF, 2NF, 3NF)
Database Concept - Normalization (1NF, 2NF, 3NF)Oum Saokosal
 
Functional dependencies and normalization for relational databases
Functional dependencies and normalization for relational databasesFunctional dependencies and normalization for relational databases
Functional dependencies and normalization for relational databasesJafar Nesargi
 
MySQL Best Practices - OTN
MySQL Best Practices - OTNMySQL Best Practices - OTN
MySQL Best Practices - OTNRonald Bradford
 
Access Ch4 Creating Reports And Forms (Jy)
Access Ch4   Creating Reports And Forms (Jy)Access Ch4   Creating Reports And Forms (Jy)
Access Ch4 Creating Reports And Forms (Jy)Chun Hoi Lam
 
Relational databases
Relational databasesRelational databases
Relational databasesFiddy Prasetiya
 
Bis Chapter3
Bis Chapter3Bis Chapter3
Bis Chapter3Chun Hoi Lam
 
Relational Databases
Relational DatabasesRelational Databases
Relational DatabasesJason Hando
 
Comparing free software for spatial DBMSs
Comparing free software for spatial DBMSsComparing free software for spatial DBMSs
Comparing free software for spatial DBMSsSmirnov Sergey
 

Andere mochten auch (20)

Entity relationship diagram for dummies
Entity relationship diagram for dummiesEntity relationship diagram for dummies
Entity relationship diagram for dummies
 
Database design & Normalization (1NF, 2NF, 3NF)
Database design & Normalization (1NF, 2NF, 3NF)Database design & Normalization (1NF, 2NF, 3NF)
Database design & Normalization (1NF, 2NF, 3NF)
 
DBMS - Normalization
DBMS - NormalizationDBMS - Normalization
DBMS - Normalization
 
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NFDatabase Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
 
Dbms4
Dbms4Dbms4
Dbms4
 
Normalization i i
Normalization   i iNormalization   i i
Normalization i i
 
Importance of Normalization
Importance of NormalizationImportance of Normalization
Importance of Normalization
 
Mysql database
Mysql databaseMysql database
Mysql database
 
RDBMS ERD
RDBMS ERDRDBMS ERD
RDBMS ERD
 
Entity Relationship Diagram
Entity Relationship DiagramEntity Relationship Diagram
Entity Relationship Diagram
 
Database Concept - Normalization (1NF, 2NF, 3NF)
Database Concept - Normalization (1NF, 2NF, 3NF)Database Concept - Normalization (1NF, 2NF, 3NF)
Database Concept - Normalization (1NF, 2NF, 3NF)
 
Functional dependencies and normalization for relational databases
Functional dependencies and normalization for relational databasesFunctional dependencies and normalization for relational databases
Functional dependencies and normalization for relational databases
 
MySQL Best Practices - OTN
MySQL Best Practices - OTNMySQL Best Practices - OTN
MySQL Best Practices - OTN
 
Access Ch4 Creating Reports And Forms (Jy)
Access Ch4   Creating Reports And Forms (Jy)Access Ch4   Creating Reports And Forms (Jy)
Access Ch4 Creating Reports And Forms (Jy)
 
Raj mysql
Raj mysqlRaj mysql
Raj mysql
 
Relational databases
Relational databasesRelational databases
Relational databases
 
Bis Chapter3
Bis Chapter3Bis Chapter3
Bis Chapter3
 
Functional dependency
Functional dependencyFunctional dependency
Functional dependency
 
Relational Databases
Relational DatabasesRelational Databases
Relational Databases
 
Comparing free software for spatial DBMSs
Comparing free software for spatial DBMSsComparing free software for spatial DBMSs
Comparing free software for spatial DBMSs
 

KĂŒrzlich hochgeladen

WhatsApp Chat: 📞 8617697112 Independent Call Girls in Darjeeling
WhatsApp Chat: 📞 8617697112 Independent Call Girls in DarjeelingWhatsApp Chat: 📞 8617697112 Independent Call Girls in Darjeeling
WhatsApp Chat: 📞 8617697112 Independent Call Girls in DarjeelingNitya salvi
 
08448380779 Call Girls In Chhattarpur Women Seeking Men
08448380779 Call Girls In Chhattarpur Women Seeking Men08448380779 Call Girls In Chhattarpur Women Seeking Men
08448380779 Call Girls In Chhattarpur Women Seeking MenDelhi Call girls
 
Ooty call girls 📞 8617697112 At Low Cost Cash Payment Booking
Ooty call girls 📞 8617697112 At Low Cost Cash Payment BookingOoty call girls 📞 8617697112 At Low Cost Cash Payment Booking
Ooty call girls 📞 8617697112 At Low Cost Cash Payment BookingNitya salvi
 
Genuine 8250077686 Hot and Beautiful 💕 Visakhapatnam Escorts call Girls
Genuine 8250077686 Hot and Beautiful 💕 Visakhapatnam Escorts call GirlsGenuine 8250077686 Hot and Beautiful 💕 Visakhapatnam Escorts call Girls
Genuine 8250077686 Hot and Beautiful 💕 Visakhapatnam Escorts call GirlsDeiva Sain Call Girl
 
2k Shots ≜ 9205541914 ≌ Call Girls In Tagore Garden (Delhi)
2k Shots ≜ 9205541914 ≌ Call Girls In Tagore Garden (Delhi)2k Shots ≜ 9205541914 ≌ Call Girls In Tagore Garden (Delhi)
2k Shots ≜ 9205541914 ≌ Call Girls In Tagore Garden (Delhi)Delhi Call girls
 
❀Personal Contact Number Varanasi Call Girls 8617697112💩✅.
❀Personal Contact Number Varanasi Call Girls 8617697112💩✅.❀Personal Contact Number Varanasi Call Girls 8617697112💩✅.
❀Personal Contact Number Varanasi Call Girls 8617697112💩✅.Nitya salvi
 
CYTOTEC DUBAI ☎ +966572737505 } Abortion pills in Abu dhabi,get misoprostal ...
CYTOTEC DUBAI ☎ +966572737505 } Abortion pills in Abu dhabi,get misoprostal ...CYTOTEC DUBAI ☎ +966572737505 } Abortion pills in Abu dhabi,get misoprostal ...
CYTOTEC DUBAI ☎ +966572737505 } Abortion pills in Abu dhabi,get misoprostal ...Abortion pills in Riyadh +966572737505 get cytotec
 
đŸ”„HOTđŸ”„đŸ“Č9602870969đŸ”„Prostitute Service in Udaipur Call Girls in City Palace Lake...
đŸ”„HOTđŸ”„đŸ“Č9602870969đŸ”„Prostitute Service in Udaipur Call Girls in City Palace Lake...đŸ”„HOTđŸ”„đŸ“Č9602870969đŸ”„Prostitute Service in Udaipur Call Girls in City Palace Lake...
đŸ”„HOTđŸ”„đŸ“Č9602870969đŸ”„Prostitute Service in Udaipur Call Girls in City Palace Lake...Apsara Of India
 
A tour of African gastronomy - World Tourism Organization
A tour of African gastronomy - World Tourism OrganizationA tour of African gastronomy - World Tourism Organization
A tour of African gastronomy - World Tourism OrganizationJuan Carlos Fonseca Mata
 
sample sample sample sample sample sample
sample sample sample sample sample samplesample sample sample sample sample sample
sample sample sample sample sample sampleCasey Keith
 
Genuine 8250077686 Hot and Beautiful 💕 Chennai Escorts call Girls
Genuine 8250077686 Hot and Beautiful 💕 Chennai Escorts call GirlsGenuine 8250077686 Hot and Beautiful 💕 Chennai Escorts call Girls
Genuine 8250077686 Hot and Beautiful 💕 Chennai Escorts call GirlsDeiva Sain Call Girl
 
WhatsApp Chat: 📞 8617697112 Hire Call Girls Cooch Behar For a Sensual Sex Exp...
WhatsApp Chat: 📞 8617697112 Hire Call Girls Cooch Behar For a Sensual Sex Exp...WhatsApp Chat: 📞 8617697112 Hire Call Girls Cooch Behar For a Sensual Sex Exp...
WhatsApp Chat: 📞 8617697112 Hire Call Girls Cooch Behar For a Sensual Sex Exp...Nitya salvi
 
Study Consultants in Lahore || 📞03094429236
Study Consultants in Lahore || 📞03094429236Study Consultants in Lahore || 📞03094429236
Study Consultants in Lahore || 📞03094429236Sherazi Tours
 
Hire 💕 8617697112 Reckong Peo Call Girls Service Call Girls Agency
Hire 💕 8617697112 Reckong Peo Call Girls Service Call Girls AgencyHire 💕 8617697112 Reckong Peo Call Girls Service Call Girls Agency
Hire 💕 8617697112 Reckong Peo Call Girls Service Call Girls AgencyNitya salvi
 
Discover Mathura And Vrindavan A Spritual Journey.pdf
Discover Mathura And Vrindavan A Spritual Journey.pdfDiscover Mathura And Vrindavan A Spritual Journey.pdf
Discover Mathura And Vrindavan A Spritual Journey.pdfMathura Vrindavan Tour Packages
 
9 Days Kenya Ultimate Safari Odyssey with Kibera Holiday Safaris
9 Days Kenya Ultimate Safari Odyssey with Kibera Holiday Safaris9 Days Kenya Ultimate Safari Odyssey with Kibera Holiday Safaris
9 Days Kenya Ultimate Safari Odyssey with Kibera Holiday SafarisKibera Holiday Safaris Safaris
 
08448380779 Call Girls In Shahdara Women Seeking Men
08448380779 Call Girls In Shahdara Women Seeking Men08448380779 Call Girls In Shahdara Women Seeking Men
08448380779 Call Girls In Shahdara Women Seeking MenDelhi Call girls
 
Visa Consultant in Lahore || 📞03094429236
Visa Consultant in Lahore || 📞03094429236Visa Consultant in Lahore || 📞03094429236
Visa Consultant in Lahore || 📞03094429236Sherazi Tours
 
ITALY - Visa Options for expats and digital nomads
ITALY - Visa Options for expats and digital nomadsITALY - Visa Options for expats and digital nomads
ITALY - Visa Options for expats and digital nomadsMarco Mazzeschi
 
Hire 💕 8617697112 Chamba Call Girls Service Call Girls Agency
Hire 💕 8617697112 Chamba Call Girls Service Call Girls AgencyHire 💕 8617697112 Chamba Call Girls Service Call Girls Agency
Hire 💕 8617697112 Chamba Call Girls Service Call Girls AgencyNitya salvi
 

KĂŒrzlich hochgeladen (20)

WhatsApp Chat: 📞 8617697112 Independent Call Girls in Darjeeling
WhatsApp Chat: 📞 8617697112 Independent Call Girls in DarjeelingWhatsApp Chat: 📞 8617697112 Independent Call Girls in Darjeeling
WhatsApp Chat: 📞 8617697112 Independent Call Girls in Darjeeling
 
08448380779 Call Girls In Chhattarpur Women Seeking Men
08448380779 Call Girls In Chhattarpur Women Seeking Men08448380779 Call Girls In Chhattarpur Women Seeking Men
08448380779 Call Girls In Chhattarpur Women Seeking Men
 
Ooty call girls 📞 8617697112 At Low Cost Cash Payment Booking
Ooty call girls 📞 8617697112 At Low Cost Cash Payment BookingOoty call girls 📞 8617697112 At Low Cost Cash Payment Booking
Ooty call girls 📞 8617697112 At Low Cost Cash Payment Booking
 
Genuine 8250077686 Hot and Beautiful 💕 Visakhapatnam Escorts call Girls
Genuine 8250077686 Hot and Beautiful 💕 Visakhapatnam Escorts call GirlsGenuine 8250077686 Hot and Beautiful 💕 Visakhapatnam Escorts call Girls
Genuine 8250077686 Hot and Beautiful 💕 Visakhapatnam Escorts call Girls
 
2k Shots ≜ 9205541914 ≌ Call Girls In Tagore Garden (Delhi)
2k Shots ≜ 9205541914 ≌ Call Girls In Tagore Garden (Delhi)2k Shots ≜ 9205541914 ≌ Call Girls In Tagore Garden (Delhi)
2k Shots ≜ 9205541914 ≌ Call Girls In Tagore Garden (Delhi)
 
❀Personal Contact Number Varanasi Call Girls 8617697112💩✅.
❀Personal Contact Number Varanasi Call Girls 8617697112💩✅.❀Personal Contact Number Varanasi Call Girls 8617697112💩✅.
❀Personal Contact Number Varanasi Call Girls 8617697112💩✅.
 
CYTOTEC DUBAI ☎ +966572737505 } Abortion pills in Abu dhabi,get misoprostal ...
CYTOTEC DUBAI ☎ +966572737505 } Abortion pills in Abu dhabi,get misoprostal ...CYTOTEC DUBAI ☎ +966572737505 } Abortion pills in Abu dhabi,get misoprostal ...
CYTOTEC DUBAI ☎ +966572737505 } Abortion pills in Abu dhabi,get misoprostal ...
 
đŸ”„HOTđŸ”„đŸ“Č9602870969đŸ”„Prostitute Service in Udaipur Call Girls in City Palace Lake...
đŸ”„HOTđŸ”„đŸ“Č9602870969đŸ”„Prostitute Service in Udaipur Call Girls in City Palace Lake...đŸ”„HOTđŸ”„đŸ“Č9602870969đŸ”„Prostitute Service in Udaipur Call Girls in City Palace Lake...
đŸ”„HOTđŸ”„đŸ“Č9602870969đŸ”„Prostitute Service in Udaipur Call Girls in City Palace Lake...
 
A tour of African gastronomy - World Tourism Organization
A tour of African gastronomy - World Tourism OrganizationA tour of African gastronomy - World Tourism Organization
A tour of African gastronomy - World Tourism Organization
 
sample sample sample sample sample sample
sample sample sample sample sample samplesample sample sample sample sample sample
sample sample sample sample sample sample
 
Genuine 8250077686 Hot and Beautiful 💕 Chennai Escorts call Girls
Genuine 8250077686 Hot and Beautiful 💕 Chennai Escorts call GirlsGenuine 8250077686 Hot and Beautiful 💕 Chennai Escorts call Girls
Genuine 8250077686 Hot and Beautiful 💕 Chennai Escorts call Girls
 
WhatsApp Chat: 📞 8617697112 Hire Call Girls Cooch Behar For a Sensual Sex Exp...
WhatsApp Chat: 📞 8617697112 Hire Call Girls Cooch Behar For a Sensual Sex Exp...WhatsApp Chat: 📞 8617697112 Hire Call Girls Cooch Behar For a Sensual Sex Exp...
WhatsApp Chat: 📞 8617697112 Hire Call Girls Cooch Behar For a Sensual Sex Exp...
 
Study Consultants in Lahore || 📞03094429236
Study Consultants in Lahore || 📞03094429236Study Consultants in Lahore || 📞03094429236
Study Consultants in Lahore || 📞03094429236
 
Hire 💕 8617697112 Reckong Peo Call Girls Service Call Girls Agency
Hire 💕 8617697112 Reckong Peo Call Girls Service Call Girls AgencyHire 💕 8617697112 Reckong Peo Call Girls Service Call Girls Agency
Hire 💕 8617697112 Reckong Peo Call Girls Service Call Girls Agency
 
Discover Mathura And Vrindavan A Spritual Journey.pdf
Discover Mathura And Vrindavan A Spritual Journey.pdfDiscover Mathura And Vrindavan A Spritual Journey.pdf
Discover Mathura And Vrindavan A Spritual Journey.pdf
 
9 Days Kenya Ultimate Safari Odyssey with Kibera Holiday Safaris
9 Days Kenya Ultimate Safari Odyssey with Kibera Holiday Safaris9 Days Kenya Ultimate Safari Odyssey with Kibera Holiday Safaris
9 Days Kenya Ultimate Safari Odyssey with Kibera Holiday Safaris
 
08448380779 Call Girls In Shahdara Women Seeking Men
08448380779 Call Girls In Shahdara Women Seeking Men08448380779 Call Girls In Shahdara Women Seeking Men
08448380779 Call Girls In Shahdara Women Seeking Men
 
Visa Consultant in Lahore || 📞03094429236
Visa Consultant in Lahore || 📞03094429236Visa Consultant in Lahore || 📞03094429236
Visa Consultant in Lahore || 📞03094429236
 
ITALY - Visa Options for expats and digital nomads
ITALY - Visa Options for expats and digital nomadsITALY - Visa Options for expats and digital nomads
ITALY - Visa Options for expats and digital nomads
 
Hire 💕 8617697112 Chamba Call Girls Service Call Girls Agency
Hire 💕 8617697112 Chamba Call Girls Service Call Girls AgencyHire 💕 8617697112 Chamba Call Girls Service Call Girls Agency
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
  • 28. June 2, 2009 Varun Arora, SICSR 2007-'09 Source – www.sims.berkely.edu
  • 29.
  • 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
  • 31. Denormalized Relation. June 2, 2009 Varun Arora, SICSR 2007-'09 FD1 FD2 Source – www.sims.berkely.edu Relation Transition 3NF->2NF
  • 32.
  • 33.
  • 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 
..