Presentation is loading. Please wait.

Presentation is loading. Please wait.

Relational Data Model, Review Relation Tuple Attribute Domains Candidate key, primary key Key attribute, non-key attribute.

Similar presentations


Presentation on theme: "Relational Data Model, Review Relation Tuple Attribute Domains Candidate key, primary key Key attribute, non-key attribute."— Presentation transcript:

1 Relational Data Model, Review Relation Tuple Attribute Domains Candidate key, primary key Key attribute, non-key attribute

2 Data Consistency, Review A data structure can be “good” or “bad” Goals: –Preservation of consistencies following updates –Storing data in a nonredundant way Functional dependency Multivalued Dependency Formal criteria for data structuring: normal forms

3 Normalization, Review A relation is in the 1NF if the domains of all attributes are simple. A relation is in the 2NF if no non-key attribute is functionally dependent on just a part of a key. A relation is in 3NF if it is in 2NF and no non-key attribute is functionally dependent on another non- key attribute. A relation is in BCNF if every determinant is a candidate key. A relation is in 4NF if every multivalued determinant is a key.

4 Conventional Normalization Procedure Determine functional and multivalued dependencies Determine candidate keys, then key and non-key attributes If needed, decompose the relation to conform with the 1NF Decompose the relation as needed to conform with the 2NF, 3NF, BCNF, and 4NF

5 Easier Normalization Procedure Determine functional and multivalued dependencies Determine candidate keys If needed, decompose the relation to conform with the 1NF and 4NF Decompose the relation to conform with the BCNF

6 Decomposition Procedure 1Take a relation, R = (A, B, C, D, E,....), that is not in the BCNF. Find an FD, C D, that is causing R to not be in BCNF 2Form two new relations: R1 = (A, B, C, E,....) and R2 = (C, D), where the dependency part of the FD has been used to form R2 3R1 and R2 must now be checked to see if they are in BCNF

7 Normalization, Decomposition Practice Makes Perfect


Download ppt "Relational Data Model, Review Relation Tuple Attribute Domains Candidate key, primary key Key attribute, non-key attribute."

Similar presentations


Ads by Google