1 / 17

Database Normalization

Database Normalization. Dr. Mahendra Jivraj Patel Templesoft Solutions Pvt. Ltd. www.templesoft.com. Data. Primary Key. A primary key is a field, or list of fields, that uniquely identify one record. Employee_Project Table. Primary Key. Project Number cannot be a Primary Key

raleigh
Télécharger la présentation

Database Normalization

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Database Normalization Dr. Mahendra Jivraj Patel Templesoft Solutions Pvt. Ltd. www.templesoft.com

  2. Data

  3. Primary Key • A primary key is a field, or list of fields, that uniquely identify one record

  4. Employee_Project Table

  5. Primary Key • Project Number cannot be a Primary Key • Neither can the Employee Number be the Primary Key • Both do not identify a row uniquely • Both together are the Primary Key for this table

  6. Employee_Project Table

  7. Normalization • There are 5 Normal Forms • Only 3 are used in commercial application • Normalization is done to maintain the integrity of data • Sometimes tables are De-Normalized for efficiency – faster reports

  8. 1st Normal Form • Eliminate repeating groups • All key attributes are defined • All attributes are dependent on the primary key

  9. 2nd Normal Form • The table HAS to be in the 1st Normal Form • The attribute should be related to the entire Primary Key • No partial dependency

  10. Data • Project Name is dependent ONLY on Project Number • Employee Name, Rate Category and Hourly Rate are dependent ONLY on Employee Number • Remove these fields from the Table

  11. Employee_Project Table

  12. Project Table

  13. Is this appropriate? Employee Table

  14. 3rd Normal Form • The table HAS to be in the 2nd Normal Form • There should be no transitive dependencies • Where a non-key attribute is dependent on another non-key attribute • Each column must be DIRECTLY dependent on the primary key

  15. Employee Table

  16. Rate Table

  17. Any Questions? Thank You vrgurus@hotmail.com mjp@templesoft.com

More Related