DATABASE MANAGEMENT SYSTEM
ASSIGNMENT 3
SUBMITTED BY
SUBMITTED TO
DE-NORMALIZATION IN DATABASE
The process of taking a normalized schema and making it non-normalized is called
denormalization.
IMPORTANCE
Denormalization is a database optimization technique used to improve the performance of read
operations by introducing redundancy into a normalized database schema. In a normalized
database, data is organized into multiple related tables to minimize redundancy and dependency.
FOUR GUIDLINES
1. Carefully do a cost benefit analysis (frequency of use, additional storage, join time).
2. Do a data requirement and storage analysis.
3. Weigh against the maintenance issue of the redundant data (triggers used).
4. When in doubt , don’t de-normalize.
EXAMPLE
Advantages Disadvantages
Improved Read Performance Increased Data Redundancy
Reduced Query Complexity Data Update Anomalies
Enhanced Scalability Complexity in Maintenance
Better Application Performance Potential for Performance Degradation
Optimized Reporting and Analytics loss of Data Integrity
Briefy explain the BCNF,4NF,5NF,6NF.
BOYCE-CODD NORMAL FORM (BCNF)
Boyce–Codd Normal Form (BCNF) is based on functional dependencies that take into account
all candidate keys in a relation; however, BCNF also has additional constraints compared with
the general definition of 3NF.
RULES FOR BCNF
Rule 1: The table should be in the 3rd Normal Form.
Rule 2: X should be a superkey for every functional dependency (FD) X−>Y in a given relation.
4 NORMAL FORM
The Fourth Normal Form (4NF) is a level of database normalization where there are no non-
trivial multivalued dependencies other than a candidate key. It builds on the first three normal
forms (1NF, 2NF, and 3NF) and the Boyce-Codd Normal Form (BCNF). It states that, in addition
to a database meeting the requirements of BCNF, it must not contain more than one multivalued
dependency.
PROPERTIES
A relation will be in 4NF if it is in Boyce Codd normal form and has no multi-valued
dependency.
For a dependency A → B, if for a single value of A, multiple values of B exists, then the
relation will be a multi-valued dependency.
EXAMPLE
5 NORMAL FORM
A relation R is in Fifth Normal Form if and only if everyone joins dependency in R is implied by
the candidate keys of R. A relation decomposed into two relations must have lossless
join Property, which ensures that no spurious or extra tuples are generated when relations are
reunited through a natural join.
PROPERTIES
A relation R is in 5NF if and only if it satisfies the following conditions:
1. R should be already in 4NF.
2. It cannot be further non loss decomposed (join dependency).
EXAMPLE
Consider the above schema, with a case as “if a company makes a product and an agent is an
agent for that company, then he always sells that product for the company”. Under these
circumstances, the ACP table is shown as:
6 NORMAL FORM
Sixth Normal Form (6NF) is a level of database normalization that is rarely encountered and is
considered quite advanced. It deals with situations where a table contains multiple independent
multi-valued facts about entities. In simpler terms, it's used when you have complex relationships
that can't be represented well in lower normal forms.
RULES
1. Atomicity
2. Full Normalization
3. Absence of Non-trivial Multi-valued Dependencies
4. Reflexivity
Minimality
5.
EXAMPLE
Consider a database for a music streaming service:
1. Songs: Contains information about individual songs.
2. Artists: Contains information about individual artists.
3. Genres: Contains information about music genres.
4. Playlists: Contains information about user playlists.
5. SongArtists: Associates songs with their artists.
6. SongGenres: Associates songs with their genres.
7. PlaylistSongs: Associates playlists with the songs they contain.