0% found this document useful (0 votes)
4 views

Normalization

Normalization is a database design technique that organizes data to reduce redundancy and improve data integrity by decomposing tables into smaller, well-structured tables linked by relationships. It involves several normal forms (1NF, 2NF, 3NF, BCNF, 4NF, 5NF) that progressively enforce stricter rules to eliminate data duplication and anomalies. While normalization enhances data integrity and efficiency, considerations like denormalization and query optimization may also be necessary for optimal database performance.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Normalization

Normalization is a database design technique that organizes data to reduce redundancy and improve data integrity by decomposing tables into smaller, well-structured tables linked by relationships. It involves several normal forms (1NF, 2NF, 3NF, BCNF, 4NF, 5NF) that progressively enforce stricter rules to eliminate data duplication and anomalies. While normalization enhances data integrity and efficiency, considerations like denormalization and query optimization may also be necessary for optimal database performance.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Normalization

Normalisation is a database design technique that organises data to reduce redundancy and improve data integrity .
It involves decomposing a table into smaller, well-structured tables, linked by relationships. The process aims to
eliminate data duplication and anomalies that can occur during insertion, update, and deletion operations. The
sources describe normalisation as a process to:

Remove redundancy (repetition) .


Improve the database's efficiency, consistency, and accuracy.

Normalisation relies on the concept of normal forms, a set of rules that define the level of organisation and structure
of a relational database. These normal forms are progressive, meaning that each subsequent normal form builds
upon the previous ones, further reducing redundancy and enforcing stricter data integrity rules.

Types of Normal Forms:

1NF (First Normal Form): A table is in 1NF if all attributes contain:


Atomic values (indivisible units).
It eliminates repeating groups of data within a table, i.e. No data repetition.
For instance, storing multiple phone numbers in a single attribute would violate 1NF. Instead, a separate table
(Foreign Key ) for phone numbers linked to the main table should be created.
2NF (Second Normal Form): A table is in 2NF if it is in 1NF and
all non-key attributes are fully functionally dependent on the primary key. This means that every non-key attribute
should be determined by the entire primary key, not just a part of it. 2NF aims to reduce redundancy caused by
partial dependencies .
3NF (Third Normal Form): A table is in 3NF if it is in 2NF and
no non-key attribute is transitively dependent on the primary key. This eliminates transitive dependencies ,
where a non-key attribute is dependent on another non-key attribute, which is in turn dependent on the primary
key. 3NF ensures that data is consistent and reduces data duplication.
BCNF (Boyce-Codd Normal Form): BCNF is a stricter form of 3NF.
It states that for every non-trivial functional dependency X → Y, X must be a super key . BCNF aims to eliminate
all redundancy based on functional dependencies .
4NF (Fourth Normal Form): A table is in 4NF if it is in BCNF and has
no multi-valued dependencies . Multi-valued dependency occurs when a single record in a table is associated
with multiple, independent values for a non-key attribute. 4NF helps to further reduce data redundancy by
separating multi-valued attributes into separate tables.
5NF (Fifth Normal Form) or PJNF (Project-Join Normal Form): 5NF
deals with join dependencies , which are more complex dependencies that cannot be captured by functional or
multi-valued dependencies. It is the highest level of normalisation and ensures that a table cannot be
decomposed into smaller tables without losing data.

Benefits of Normalisation:

Reduced Data Redundancy: By eliminating duplicate data, normalisation minimises storage space and reduces
the risk of inconsistencies.
Improved Data Integrity: Normalisation ensures that data is consistent and accurate by enforcing relationships
and constraints.
Simplified Data Maintenance: Updating, inserting, and deleting data becomes easier and more efficient with
normalised tables.
Better Query Performance: Normalised tables can lead to better query performance as the database
management system can access and retrieve data more efficiently.

Process of Normalisation:
Normalisation involves a series of steps, starting with identifying functional dependencies and then applying the rules
of each normal form to decompose the table into smaller ones. The process aims to create a set of relations that
satisfy the desired normal form while preserving data integrity.

Other Considerations in Database Design:

While normalisation is a crucial aspect of database design, other considerations exist. These include:

Denormalisation: In some situations, intentionally introducing redundancy can improve performance by reducing
the need for complex joins.
Query Optimisation: Efficient query design and the use of indexes are essential for achieving optimal database
performance.
Transaction Processing: Mechanisms for managing concurrent transactions and ensuring data consistency are
crucial for multi-user databases.

Overall, normalisation is a powerful technique for designing robust and efficient relational databases. It helps
ensure data integrity, reduce redundancy, and improve data management. By understanding and applying normal
forms, database designers can create databases that are well-structured, easy to maintain, and perform well.
However, the choice of normal form and the extent of normalisation depend on the specific requirements and
characteristics of the application.

Compare and contrast BCNF and 3NF.

Both Boyce-Codd Normal Form (BCNF) and Third Normal Form (3NF) are normal forms in relational database
design aimed at reducing data redundancy and enhancing data integrity. However, they differ in their
strictness and trade-offs.

BCNF (Boyce-Codd Normal Form)


Definition: A relation schema R is in BCNF with respect to a set F of functional dependencies if, for all functional
dependencies in F+ of the form α → β, where α ⊆ R and β ⊆ R, at least one of the following holds:
α → β is a trivial functional dependency (i.e., β ⊆ α).
α is a superkey for schema R.
Strictness: BCNF is a stricter normal form than 3NF, meaning that a relation schema that satisfies BCNF also
satisfies 3NF.
Advantages: BCNF eliminates all redundancy that can be discovered based on functional dependencies.
Disadvantages: Achieving a dependency-preserving BCNF decomposition is not always possible. This means
that in some cases, decomposing a relation schema into BCNF might require sacrificing the ability to enforce
certain functional dependencies without joining the decomposed relations back together.

3NF (Third Normal Form)

Definition: A relation schema R is in third normal form with respect to a set F of functional dependencies if, for all
functional dependencies in F+ of the form α → β, where α ⊆ R and β ⊆ R, at least one of the following holds:
α → β is a trivial functional dependency.
α is a superkey for R.
Each attribute A in β − α is contained in a candidate key for R.
Strictness: 3NF is less restrictive than BCNF, meaning that it allows for some functional dependencies that
BCNF would not.
Advantages: It is always possible to achieve a 3NF design without sacrificing losslessness or dependency
preservation. This means that a relation schema can be decomposed into 3NF while preserving the ability to
enforce all functional dependencies within the decomposed relations.
Disadvantages: Relations in 3NF may have some redundancy. This is considered an acceptable trade-off when
a dependency-preserving decomposition into BCNF is not achievable.

Comparison
Feature BCNF 3NF
Strictness More strict. All schemas in BCNF are also in 3NF. Less strict. Allows for some dependencies not permitted in
BCNF.
Redundancy Aims to eliminate all redundancy based on May allow for some redundancy in situations where a
functional dependencies. dependency-preserving BCNF decomposition is not possible.
Decomposition May not always be possible to achieve a Guarantees a lossless and dependency-preserving
dependency-preserving decomposition. decomposition.
Trade-offs May require choosing between BCNF and Represents a compromise, allowing dependency
dependency preservation. preservation but potentially at the cost of some redundancy.
Practicality Preferred when possible due to its stricter A suitable alternative when a dependency-preserving BCNF
elimination of redundancy. However, may not be decomposition is not achievable. Offers a balance between
feasible. goals.

In summary, BCNF is the more desirable normal form due to its stricter reduction of redundancy. However, when a
dependency-preserving BCNF decomposition is not possible, 3NF is a good alternative that ensures both
losslessness and dependency preservation, albeit with the potential for some remaining redundancy.

You might also like