Presentation is loading. Please wait.

Presentation is loading. Please wait.

Normal Forms.

Similar presentations


Presentation on theme: "Normal Forms."— Presentation transcript:

1 Normal Forms

2 Relationships Among Normal Forms
Relations in 1NF Relations in 3NF Relations in BCNF Relations in 4NF

3 Properties of Normal Forms
Property 3NF BCNF 4NF Eliminates Redundancy due to FD's No Yes Eliminates Redundancy due to MVD's Decomposition can always preserve FD's Decomposition can always preserve MVD's

4 If your database has lots of redundancy due to multivalued dependencies, which decomposition is best? 1. 3NF 2. BCNF 3. 4NF 4. Depends

5 If your database has lots of redundancy due to functional dependencies, which decomposition is best?
1. 3NF 2. BCNF 3. 4NF 4. Depends

6 If your database needs to preserve functional dependencies, which decomposition is best?
1. 3NF 2. BCNF 3. 4NF 4. Depends

7 If your database needs to preserve multivalued dependencies, which decomposition is best?
1. 3NF 2. BCNF 3. 4NF 4. Depends

8 What about Second Normal Form?
Second normal form (2NF) is basically never used. Nor for that matter is first normal form (1NF). Neither provides properties that want from databases on their own. For completeness: A table is in 2NF if it is in 1NF and no non-prime attribute is dependent on any proper subset of any key of the name. A non-prime attribute of a table is an attribute that is not a part of any key of the table. In other words, a table is in 2NF if it is in 1NF and every non-prime attribute of the table is dependent on the whole of every candidate key. Don't worry about it, nobody (including me) cares about this form. Sorry, 2NF nobody likes you.

9 Higher Normal Forms There are fifth and sixth and more normal forms that eliminate other forms of redundancy that are beyond the scope of this class. Those other types of redundancy are rarely present in databases, so the higher normal forms are rarely invoked.

10 What is normalization? Normalization is the process of converting your database schema to conform to one of the normal forms, and hence remove some form of redundancy.

11 Is normalization a good thing?
1. Always, otherwise your database is broken 2. Yes, if the properties of the normal form are desirable 3. No, they slow down development and cost programmer time. 4. Never, normal is boring, be strange!


Download ppt "Normal Forms."

Similar presentations


Ads by Google