Database Normalisation: (WEEK 5) Outline
Database Normalisation: (WEEK 5) Outline
Database Normalisation: (WEEK 5) Outline
Outline
Diagrammatic representation.
A is called the determinant
B is dependant attribute(s)
Depends on the semantics of a relation – hold on all instances of a relation (all the time)
2. sName → staffNo
However, the only functional dependency that remains true for all possible values for the
staffNo and sName attributes of the Staff relation is:
staffNo → sName
Determinants should have the minimal number of attributes necessary to maintain the
functional dependency with the attribute(s) on the right hand-side.
if A and B are attributes of a relation, B is fully functionally dependent on A, if B is
functionally dependent on A, but not on any proper subset of A.
Transitive Dependencies
A transitive dependency in a relation can potentially cause update anomalies. Transitive
dependency describes a condition where A, B, and C are attributes of a relation such that If A →
B and B → C, then A → C That is C is transitively dependent on A via B (provided that A is not
functionally dependent on B or C).
the minimal number of attributes necessary to support the data requirements of the
enterprise;
minimal redundancy with each attribute represented only once with the important
exception of attributes that form all or part of foreign keys.
Benefits of Normalization
The benefits of using a database that has a suitable set of relations is that the database
will be:
easier for the user to access and maintain the data;
take up minimal storage space on the computer.
Potential benefits for implemented database include:
Updates to the data stored in the database are achieved with a minimal
number of operations us reducing the opportunities for data
inconsistencies.
Reduction in the file storage space required by the base relations thus
minimizing costs.
Denormalization: The process of storing the join of higher normal form relations as a base
relation—which is in a lower normal form.
Third Normal Form (3NF) A relation is in 3NF when it is in 2NF and all the non-key
attributes are directly dependent on the primary key.
A relation that is in first normal form and every non-primary-key attribute is fully
functionally dependent on any candidate key.
A relation that is in first and second normal form and in which no non-primary-key
attribute is transitively dependent on any candidate key.