0% found this document useful (0 votes)
39 views

Normal Forms Based On Primary Keys

The document discusses 3 normal forms based on primary keys: first normal form, second normal form, and third normal form. It defines keys, attributes, and normal forms. First normal form requires that attributes are atomic and relations cannot be nested. Second and third normal forms are based on keys and functional dependencies to ensure relations are decomposed properly. The document notes that normalization is done in practice to improve design quality and meet desirable properties, but designers need not normalize to the highest form.

Uploaded by

sweety
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views

Normal Forms Based On Primary Keys

The document discusses 3 normal forms based on primary keys: first normal form, second normal form, and third normal form. It defines keys, attributes, and normal forms. First normal form requires that attributes are atomic and relations cannot be nested. Second and third normal forms are based on keys and functional dependencies to ensure relations are decomposed properly. The document notes that normalization is done in practice to improve design quality and meet desirable properties, but designers need not normalize to the highest form.

Uploaded by

sweety
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 9

3 Normal Forms Based on Primary Keys

3.1 Normalization of Relations


3.2 Practical Use of Normal Forms
3.3 Definitions of Keys and Attributes
Participating in Keys
3.4 First Normal Form
3.5 Second Normal Form
3.6 Third Normal Form

Chapter 10-1
3.1 Normalization of Relations (1)

• Normalization: The process of decomposing


unsatisfactory "bad" relations by breaking up their
attributes into smaller relations

• Normal form: Condition using keys and FDs of a


relation to certify whether a relation schema is in a
particular normal form

Chapter 10-2
Normalization of Relations (2)

• 2NF, 3NF, BCNF based on keys and FDs of a relation


schema
• 4NF based on keys, multi-valued dependencies :
MVDs; 5NF based on keys, join dependencies : JDs
(Chapter 11)
• Additional properties may be needed to ensure a
good relational design (lossless join, dependency
preservation; Chapter 11)

Chapter 10-3
3.2 Practical Use of Normal Forms

• Normalization is carried out in practice so that the resulting


designs are of high quality and meet the desirable properties
• The practical utility of these normal forms becomes
questionable when the constraints on which they are based
are hard to understand or to detect
• The database designers need not normalize to the highest
possible normal form. (usually up to 3NF, BCNF or 4NF)
• Denormalization: the process of storing the join of higher
normal form relations as a base relation—which is in a lower
normal form

Chapter 10-4
3.3 Definitions of Keys and Attributes
Participating in Keys (1)
• A superkey of a relation schema R = {A1, A2, ...., An} is
a set of attributes S subset-of R with the property
that no two tuples t1 and t2 in any legal relation state
r of R will have t1[S] = t2[S]

• A key K is a superkey with the additional property


that removal of any attribute from K will cause K not
to be a superkey any more.

Chapter 10-5
Definitions of Keys and Attributes
Participating in Keys (2)
• If a relation schema has more than one key, each is
called a candidate key. One of the candidate keys is
arbitrarily designated to be the primary key, and the
others are called secondary keys.
• A Prime attribute must be a member of some
candidate key
• A Nonprime attribute is not a prime attribute—that
is, it is not a member of any candidate key.

Chapter 10-6
3.2 First Normal Form

• Disallows composite attributes, multivalued


attributes, and nested relations; attributes
whose values for an individual tuple are non-
atomic

• Considered to be part of the definition of


relation

Chapter 10-7
Figure 10.8 Normalization into 1NF

Note: The above figure is now called Figure 10.8 in Edition 4

Chapter 10-8
Figure 10.9 Normalization nested relations into
1NF

Note: The above figure is now called Figure 10.9 in Edition 4


Chapter 10-9

You might also like