Unit05555552. Chapter 5
© 2000 Prentice Hall
The Relational Model
• Broad, flexible model
• Basis for almost all DBMS products
• E.F. Codd defined well-structured
“normal forms” of relations,
“normalization”
Page 113
3. Chapter 5
© 2000 Prentice Hall
Relation
• Two-dimensional table
• Rows are tuples
• Columns are attributes
Page 113
6. Chapter 5
© 2000 Prentice Hall
Functional Dependency
Notation
SID Major
ComputerSerialNumber MemorySize
(SID, ClassName) Grade
Page 115
7. Key
“a group of one or more attributes that
uniquely identifies a row”
Page 116
Figure 5-3 © 2000 Prentice Hall
9. Chapter 5
© 2000 Prentice Hall
Normalization
“the process of evaluating and
converting a relation to reduce
modification anomalies”
Page 118
10. Chapter 5
© 2000 Prentice Hall
Anomaly
“an undesirable consequence of data
modification in which two or more
different themes are entered
(insertion anomaly) in a single row or
two or more themes are lost if the
row is deleted (deletion anomaly)”
Page 118
11. Chapter 5
© 2000 Prentice Hall
Normal Forms
“classes of relations and techniques for
preventing anomalies”
DK/NF = Domain Key Normal Form
(free of modification anomalies)
Page 118
12. First Normal Form
“any table of data that meets the
definition of a relation”
Figure 5-3 © 2000 Prentice Hall
13. Second Normal Form
“when all of a relation’s nonkey attributes
are dependent on all of the key”
Figure 5-5 © 2000 Prentice Hall
14. Third Normal Form
“if it is in second normal form and has
no transitive dependencies”
Figure 5-7 © 2000 Prentice Hall
18. Chapter 5
© 2000 Prentice Hall
Domain Key Normal Form
“if every constraint on the relation is a
logical consequence of the definition
of keys and domains”
Page 125
19. Chapter 5
© 2000 Prentice Hall
DK/NF Terms
• Constraint “a rule governing static
values of attributes”
• Key “unique identifier of a tuple”
• Domain “description of an
attribute’s allowed values”
Page 126
24. Chapter 5
© 2000 Prentice Hall
A B relationships
A B and B A one-to-one
A B but B not A many-to-one
A not B and B not A many-to-many
Page 131
26. Chapter 5
© 2000 Prentice Hall
Optimization
• De-Normalization
• Controlled Redundancy
Page 135