1 / 14

First normal form

First normal form. The intersection of each row and column contains one and only one value No multivalued attributes Two approaches to normalisation Flatten by duplicating non repeating data Put repeated data into a separate relation. Id. Name. Add. DOB. ModId. Mark. Desc. 1. BB.

Download Presentation

First normal form

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. First normal form • The intersection of each row and column contains one and only one value • No multivalued attributes • Two approaches to normalisation • Flatten by duplicating non repeating data • Put repeated data into a separate relation CM205-6

  2. Id Name Add DOB ModId Mark Desc 1 BB 2918 3/3/77 cm141 cm142 7 6 CSA adv prog CM205-6

  3. CM205-6

  4. STUDENT ENROL CM205-6

  5. Normalization • Anomalies caused by redundant data • Insertion, deletion, modification • Certain functional dependencies cause anomalies • Normalization breaks a relation into two or more relations removing the undesirable functional dependencies CM205-6

  6. Videotape : ( videoid, datePurchased,title, genre, length) CM205-6

  7. Anomalies • Insertion of a new copy of “Sooty” means we must check that the details are consistent • Changing length of “Sooty” must be done on all videos of “Sooty” • Deleting the last copy of Sooty means the information on the movie is also lost CM205-6

  8. Functional dependency • Describes the relationships between attributes in a relation from their semantics • If A and B are attributes (or sets of attributes) of a relation R. B is functionally dependent on A if every value of A determines a unique value of B CM205-6

  9. Video example The second dependency is that between non key attributes, indirect key dependency If we locate this dependency in our relation, it will imply the problems we have described CM205-6

  10. Second Normal Form Full functional dependency: B is fully functionally dependent on A if B is functionally dependent on A, but not on any proper subset of A Second Normal Form: First normal form and every non-primary key attribute is fully functionally dependent on the primary key CM205-6

  11. In ENROLMOD Not in 2NF. Partial key dependency. Create a new relation from the partial key dependency. Remove the attributes in the range from first relation. CM205-6

  12. CM205-6

  13. Third Normal Form Transitive dependency Third normal form 2NF and no transitive dependency CM205-6

  14. Video example Not in 3NF. Define a new relation from the transitively dependent attributes CM205-6

More Related