CHAPTER 15 Normalization Flashcards
What is relational database design?
The grouping of attributes to form “good” relation schemas
Two levels of relation schemas
The logical “user view” level
The storage “base relation” level
Logical level
how users interpret the relation schemas
and the meaning of their attributes.
Storage level
how the tuples in a base relation are stored and updated
Database design approaches
bottom-up design
top-down design
bottom up design
considers the basic relationships among individual attributes as the starting point and uses those to construct relation schemas. not popular
top down design
starts with a number of groupings of
attributes into relations that exist together naturally
The implicit goals
of the design activity
information preservation, and minimum redundancy
informal guidelines for good relational design
Making sure that the semantics of the attributes is clear in the schema
Reducing redundant info. in tuples
Reducing the Null values in tuples
Disallowing the possibility of generating spurious tuples
GUIDELINE 1: Informally, each tuple in a relation should represent one entity or relationship instance. What are the problems if this is not followed?
Mixing attributes of multiple entities may cause problems
Information is stored redundantly wasting storage
Problems with update anomalies
Insertion anomalies
Deletion anomalies
Modification anomalies
Guideline 2: Design the base relation schemas so that no insertion, deletion, or modification anomalies are present in the relations. If there are anomalies what should you do?
If any anomalies are present, note them
clearly and make sure that the programs that update the database will operate correctly
Guildeline 3: As far as possible, avoid placing attributes in a base relation whose values may frequently be NULL. If there are null values what should you do?
If NULLs are unavoidable, make sure that they apply in exceptional cases only and do not apply to a majority of tuples in the relation.
spurious tuples
Bad designs for a relational database may result in erroneous results for certain JOIN operations
GUIDELINE 4: The relations should be designed to satisfy the lossless join condition.
No spurious tuples should be generated by doing a natural-join of any relations.
There are two important properties of decompositions
non-additive or losslessness of the corresponding join
preservation of the functional dependencies.