DBMS
DBMS
Normal Description
Form
Here, we can notice data repetition, but 1NF doesn’t care about it.
Example 2:
Consider the following table. Its primary key is {StudentId, ProjectId}.
The Functional dependencies given are -
StudentId → StudentName
ProjectId → ProjectName
As this table is not in BCNF form, so we decompose it into the following tables:
3. The database becomes easy to maintain when we organize it using normal forms.
4. It becomes comparatively easier to write queries as the size of the database decreases.
5. Decreased database size further reduces the complexity of sorting and finding any value in
the database.
Disadvantages of Normalization
The following are the disadvantages of normalization in database:
1. Decomposing the table in Normalization can lead to a poorer database design and severe
problems.
Functional Dependency
The functional dependency is a relationship that exists between two attributes. It typically
exists between the primary key and non-key attribute within a table.
1. X → Y
The left side of FD is known as a determinant, the right side of the production is known as a
dependent.
For example:
Advertisement
Here Emp_Id attribute can uniquely identify the Emp_Name attribute of employee table
because if we know the Emp_Id, we can tell that employee name associated with it.
1. Emp_Id → Emp_Name
We can say that Emp_Name is functionally dependent on Emp_Id.
1. ID → Name,
2. Name → DOB
Decomposition in DBMS
Types of Decomposition
There are two types of Decomposition:
• Lossless Decomposition
• Lossy Decomposition
Types of Decomposition
Lossless Decomposition
The process in which where we can regain the original relation R with the help
of joins from the multiple relations formed after decomposition. This process
is termed as lossless decomposition. It is used to remove the redundant data
from the database while retaining the useful information. The lossless
decomposition tries to ensure following things:
• While regaining the original relation, no information should be lost.
• If we perform join operation on the sub-divided relations, we must get the
original relation.
Example:
There is a relation called R(A, B, C)
A B C
55 16 27
48 52 89
55 16
48 52
R2(B, C)
B C
16 27
52 89
After performing the Join operation we get the same original relation
A B C
55 16 27
48 52 89
Lossy Decomposition
As the name suggests, lossy decomposition means when we perform join
operation on the sub-relations it doesn't result to the same relation which was
decomposed. After the join operation, we always found some extraneous
tuples. These extra tuples genrates difficulty for the user to identify the original
tuples.
Example:
We have a relation R(A, B, C)
A B C
1 2 1
2 5 3
3 3 3
1 2
2 5
3 3
R2(B, C)
B C
2 1
5 3
3 3
1 2 1
2 5 3
2 3 3
A B C
3 5 3
3 3 3
Properties of Decomposition
• Lossless: All the decomposition that we perform in Database
management system should be lossless. All the information should not be
lost while performing the join on the sub-relation to get back the original
relation. It helps to remove the redundant data from the database.
• Dependency Preservation: Dependency Preservation is an important
technique in database management system. It ensures that the functional
dependencies between the entities is maintained while performing
decomposition. It helps to improve the database efficiency, maintain
consistency and integrity.
• Lack of Data Redundancy: Data Redundancy is generally termed as
duplicate data or repeated data. This property states that the
decomposition performed should not suffer redundant data. It will help us
to get rid of unwanted data and focus only on the useful data or
information.