Presentation is loading. Please wait.

Presentation is loading. Please wait.

The Relational Model and Normalization The Relational Model Normalization First Through Fifth Normal Forms Domain/Key Normal Form The Synthesis of Relations.

Similar presentations


Presentation on theme: "The Relational Model and Normalization The Relational Model Normalization First Through Fifth Normal Forms Domain/Key Normal Form The Synthesis of Relations."— Presentation transcript:

1

2 The Relational Model and Normalization The Relational Model Normalization First Through Fifth Normal Forms Domain/Key Normal Form The Synthesis of Relations Design Trade-Offs

3 The Relational Model Relations; Tuples; Attributes Functional Dependencies: çExist in the cases when given the value of one attribute, we can obtain the value of another attribute. Example: SID  Major; ComputerSerialNumber  MemorySize çDeterminants and dependents Functional Dependencies, Keys, and Uniqueness

4 Normalization Anomalies are problems with the relations which may be created because of data modifications. Deletion, insertion, and modification anomalies. The essence of normalization is to ensure that every normalized relation has a single theme. Classes of relations and the techniques for preventing anomalies are called normal forms. Fig. 5-6 pg.117

5 First Through Fifth Normal Forms Any table following basic rules of relations is in first normal form. A relation is in second normal form if all its nonkey attributes are dependent on all of the key. (Partial dependency; also applicable to composite keys) Fig. 5-4,5 pg. 114,116

6 A relation in third normal form is one without transitive dependencies. Fig.5-7 pg. 119 çSID  Building and Building  Fee A relation is in BCNF - Boyce Codd Normal Form,if every determinant is a candidate key. Fig. 5-8 pg. 120 çCandidate vs. primary key A relation in fourth normal form must have no multivalued dependencies. Fig. 5-9,10,11 pg. 121-123.

7 çMultivalued dependencies exist when a single value of the determinant relates to several values of the dependent e.g. SID  Major or SID  Activity. The fifth normal form has to do with relations that can be divided into subrelations but then cannot be reconstructed.

8 Domain/Key Normal Form A relation is in DK/NF if every constraint on the relation is a logical consequence of the definition of keys and domains. çConstraints include edit rules, intrarelation and interrelation constraints, functional dependencies, etc. çExample 1 Fig. 5-12,13 pg. 124-5 çExample 2 Fig. 5-14,15 pg. 126 çExample 3 Fig. 5-16,17 pg. 147-8

9 The Synthesis of Relations Summary of Three Types of Attribute Relationships çFig. 5-18 pg. 128 Summary of Rules for Constructing Relations çFig. 5-19,20 pg. 130

10 Design Trade-Offs Sometimes the result of normalization is not worth the cost. De- Normalization. Example pg. 133 Optimization. Example pg. 134


Download ppt "The Relational Model and Normalization The Relational Model Normalization First Through Fifth Normal Forms Domain/Key Normal Form The Synthesis of Relations."

Similar presentations


Ads by Google