Module 03b - Normalization Flashcards
Insertion anomalies
we cannot add a new row to the database unless we add another independent data
Update anomaly
If we change a row we have to make changes in more than one place or else the database will be inconsistent.
Deletion anomaly
If one data is deleted from the database, we loose information that we had related to another data.
Source of anomalies and solution
Normal Forms
1NF - A table that qualifies as a relation AND has a defined primary key
2NF - all of its non-key attributes are dependent on all of the primary keys
3NF - It’s in 2NF and has no determinants except the primary key
BCNF - If every determinant is a candidate key
Is higher level of NF always desired?
No. Depends on the application
Procedure of normalize the tables
Multivalued dependencies
Occurs when a determinant is metched with a particular set of values. The determinant of a multivalued dependency can never be a primary key
MVD and 4NF
Multivalued dependencies are not a problem if they are in a separate relation, so: Always put multivalued dependencies into their on relation (4NF)
4 Normal Form
Is a normal form used in database normalization. Introduced by Ronald Fagin in 1977.
For every one of its non-trivial multivalued dependencies, X–>–>Y, X is a superkey
Superkey
a set of attributes of a relation variable for which it holds that in all relations assigned to that variable, there are two distinct tuples (rows) that have the same values for the attributes in this set.