Normal Form Flashcards
Normalisation of data
A process of analyzing the given relation schemas based on their Functional Dependencies and primary keys to achieve the desired properties of:
- minimizing redundancy
- minimizing the insertion, deletion and update anomalies
Normal Form
A series of rules that sun to reduce data redundancy and inconsistencies by organising data in a structured manner.
The normalisation process involves breaking down database into smaller, more manageable parts called tables and applying set of rules to ensure that each table contains unique and relevant information.
First Normal Form
1NF: A table is in 1NF if it has a primary key and no repeating groups of data.
Second Normal Form
2NF: A table is in 2NF if it is in 1NF and all non-key attributes are fully functionally dependent on the primary key
3NF
Third Normal Form
No transitive dependencies for non-prime attributes
Fourth Normal Form
4NF: A table is in 4NF if it is in 3NF and it doesn’t have any nontrivial multi-valued dependencies (MVDs)
Informal Design Guidelines for Relational Databases
Set of best practices and principles that are used to design effective and efficient relational databases:
- Semantics of the relational attributes must be clear
- sideline for redundant information in tuples and update anomalies
- Null values in tuples
Guideline 1
- Each tuple in a relation should represent one entity or relationship instance
- Attributes of different entities should not be mixed in the same relation
- Only foreign keys should be used to refer to other entities
- Entity and Relationship attributes should be kept apart as much as possible
Functional Dependencies
A functional Dependency indicates that the value of one or more attributes uniquely determines the value of another.
A -> B
The constraint must hold on every relation instance
If K is a key of R then K functionally determines all attributes in R
Normalisation of data
A process of analysing the given relation schemas based on their Functional Dependencies and primary keys to minimise:
- redundancy
- insertion, deletion and update anomalies
Normal Form
- we verify whether a relation schema is in a particular form using keys and FDs of a relation.
- the highest normal form condition that it meets, indicates the degree of normalisation
Non-addictive join Property
Guarantees that the spurious tuples generation problem does not occur with respect to the relation schema after decomposition
It is extremely important and cannot be sacrificed
Normalisation
Prime attribute
An attribute that is a member of the primary key
Full Functional Dependency