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

DBMS Normalization

The document discusses DBMS normalization, which is the process of organizing data in a database to reduce redundancy and improve efficiency. It outlines the importance of normalization, including preventing anomalies and ensuring data consistency, and explains key terminologies such as super key, candidate key, and composite key. The document also details various normal forms (1NF, 2NF, 3NF, BCNF, 4NF, and 5NF) and provides tasks for practical implementation of normalization concepts.

Uploaded by

workmail1524
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views

DBMS Normalization

The document discusses DBMS normalization, which is the process of organizing data in a database to reduce redundancy and improve efficiency. It outlines the importance of normalization, including preventing anomalies and ensuring data consistency, and explains key terminologies such as super key, candidate key, and composite key. The document also details various normal forms (1NF, 2NF, 3NF, BCNF, 4NF, and 5NF) and provides tasks for practical implementation of normalization concepts.

Uploaded by

workmail1524
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 18

DBMS Normalization

01/20/2025

Pivotal Insights | Focused Solutions


AGENDA

01 What is Normalization
02 Why do we need Normalization?
03 Knowing Terminologies
04 Normal Forms
05 Tasks

2
01
What is Normalization?
Normalization
• Process of organizing data in a database.

• Includes creating tables and establishing relationship between those tables in a way that it reduces redundancy and inconsistent
dependency.

4
02
Why do we need Normalization?
Why do we need Normalization?
Normalization is essential for improving the structure and efficiency of a database. The main benefits include:

1. Reducing Data Redundancy and Inconsistent Dependencies:


By organizing data into normalized forms, redundant and duplicate data are minimized, which ensures better consistency and reliability in the
database.

2. Preventing Anomalies:
The three common types of anomalies are:
a. Insert Anomaly: This occurs when certain data cannot be inserted into the database without the presence of other data.
Example: If we need to add a new department but cannot do so until an employee is hired into it, this limitation is an insertion anomaly,
as it prevents new records from being added independently.

b. Update Anomaly: This happens when data is updated in one location but not in others, leading to inconsistencies.
Example: If an employee named ‘Lee’ moves from the IT department to HR, and their department information is stored in multiple
tables (e.g., employee records and leave data), failing to update all occurrences results in conflicting information.

c. Delete Anomaly: This arises when some records are lost or deleted from the database table due to the deletion of other records.
Example: if we want to remove ‘Perry’ and ‘Steve’ as they are no longer in the organization, it also removes other attributes from the
table like address, department and other details, and their records are deleted, information about their associated departments or
addresses may also be lost, even if that data is still relevant.

6
03
Knowing Terminologies
Knowing Terminologies regarding Normalization

1. Super Key
A super key is any combination of attributes (columns) that can
uniquely identify a row in a table. It may include unnecessary
attributes in addition to the ones required for unique
identification.

2. Candidate Key
A candidate key is a minimal super key. It is the smallest set of
attributes that can uniquely identify a row in a table. A table
may have multiple candidate keys.

3. Composite Key
A composite key is a candidate key that consists of two or
more attributes combined to uniquely identify a row in a table.
Composite keys are necessary when a single attribute is not
sufficient for unique identification.

8
04
Normal Forms
Unnormalized Relation

[UnNormalized Data consisting of attributes with more than one values ]

10
Normalization – 1st Normal Form
1. 1st Normal Form

• Each table cell should contain a single value.

The table in 1NF:

[Attributes containing single values]

11
Normalization – 2nd Normal Form
2. 2nd Normal Form

• It should be in 1st Normal Form.


• In the second normal form, all the non-prime attributes of the relation are fully functionally dependent on the whole attribute and not just
a part of the attribute.
• Attribute values should depend on the whole key not any part of the key, Partial dependencies columns shoved be moved to sub tables.

The table in 2NF:

[Full functional dependency on PatientNumber]

[Full functional dependency on SurgeonNumber]

[Full functional dependency on PatientNumber and SurgeonNumber as a whole ]

12
Normalization – 3rd Normal Form
3. 3rd Normal Form

• It should be in 2nd Normal Form.


• In the third normal form, there should be no transitive functional dependencies in a table definition.
• When one non-key attribute can be determined with one or more non-key attributes there is said to be a transitive functional dependency.

The table in 3NF:

[Since the DrugSideEffect


depends on the Drug and not
directly on the primary key
(PatientNumber,
SurgeonNumber), this creates a
Transitive Dependency.]

13
Normalization – After 3rd Normal Form
After 3rd Normal Form
[Surgeon]
[Patient]

[SurgeryDetails]

[Drug]

14
Normalization – Other Normal Forms
4. Boyce-Codd Normal Form (BCNF)

For every functional dependency 𝑋→𝑌, X (the determinant) must be a superkey:


• It should be in 3rd Normal Form.

• If a functional dependency exists where 𝑋 is not a superkey, the table violates BCNF.
• A superkey is a set of one or more attributes that can uniquely identify a record in the table.

5. 4th Normal Form


• It should be in BCNF.
• There should not be any multi-valued dependencies in the table, especially independent multi-valued facts about an entity.
• For Example, a table having columns like (StudentId, Course, Hobby). Now consider, a student can enroll in multiple courses, a student can
have multiple hobbies, the courses and hobbies are independent of each other, yet they are combined into a single table, causing
redundancy.

6. 5th Normal Form


• It should be in 4NF.
• It resolves join dependencies, meaning:
• If a table can be reconstructed by joining smaller tables without any loss of information, then the decomposition is necessary.
• Join Dependency: A join dependency occurs when a table can be decomposed into two or more tables, and those tables can be
joined back to form the original table without any data loss.
• For example, a table having columns like (EmployeeId, Skills, Project). Now consider, An employee can have multiple skills, an
employee can work on multiple projects, each skill may be required for multiple projects. Decomposing or joining these 3 tables
(Employee-Skill, Skill-Project and Employee-Project) will reconstruct the original table without any loss of data.

15
05
Tasks
Practicing Tasks

Need to implement the below mentioned tasks:

1. Design an example to demonstrate the process of normalizing tables from an unnormalized form to 3NF, covering all possible scenarios
discussed during the sessions.
2. List out the possible Super keys, Candidate keys and Composite Keys from your dataset.
3. Create a table definition that incorporates composite keys.
4. Implement composite keys using a combination of primary and foreign keys across tables.
5. Evaluate the enforcement of referential integrity, identifying scenarios where it can be holded and where it may be violated.

17
Thank You

Pivotal Insights | Focused Solutions

You might also like