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

Normalization

Normalization

Uploaded by

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

Normalization

Normalization

Uploaded by

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

Normalization in DBMS

Agenda
• A Brief Introduction to DBMS • Denormalization: When and Why?
• What is Normalization? • Examples of Normalization
• Why Normalize a Database? • Normalization vs Denormalization
• Overview of Normal Forms • Benefits of Normalization
• First Normal Form (1NF) • Limitations of Normalization
• Second Normal Form (2NF) • Real-world Application of Normalization
• Third Normal Form (3NF) • Normalization in NoSQL Databases
• Boyce-Codd Normal Form (BCNF) • Normalization Practice Questions
• Fourth Normal Form (4NF) • Key Points
• Fifth Normal Form (5NF) • Resources for Further Learning
A Brief Introduction to DBMS

01 02 03
Definition of DBMS Key components of DBMS Importance of DBMS in
managing data
What is Normalization?

1 2 3

Definition of normalization in The primary goal of Normalization organizes data


the context of databases. normalization is to reduce data into multiple related tables.
redundancy and ensure data
integrity.
Why Normalize a Database?

To eliminate duplicate data and ensure data integrity.

To minimize data anomalies and update anomalies.

To optimize the database structure for efficient querying and storage.


Overview of Normal Forms
First Normal Form (1NF) eliminates repeating groups in a Boyce-Codd Normal Form (BCNF) is a stricter version of
table. 3NF, eliminating all anomalies.

Second Normal Form (2NF) requires the properties of Fourth Normal Form (4NF) eliminates multi-valued
1NF and eliminates partial dependencies. dependencies.

Third Normal Form (3NF) requires 2NF and eliminates Fifth Normal Form (5NF) addresses rare cases of complex
transitive dependencies. data relationships.
First Normal Form (1NF)

Key Point Example


• Explanation of what 1NF is and its purpose in eliminating • An example to illustrate the concept of 1NF, such as a
repeating groups in a table.
table with repeating columns that needs to be normalized.
• How 1NF works to ensure each table has a unique
primary key. • Explanation of how the example table is transformed to
adhere to 1NF.
Second Normal Form (2NF)

What is 2NF? Key Points


• 2NF is a normal form in database normalization. • Identifying the primary key is the first step in applying 2NF.
• It eliminates partial dependencies by ensuring that non-key
• All non-key attributes should depend on the entire primary
attributes are fully functionally dependent on the primary key.
key, not on a part of it.
Third Normal Form (3NF)

Definition Example
• Explains that a table is in 3NF if it is in 2NF and no • Provide an example to help understand what kind of data
transitive dependencies exist.
arrangement violates 3NF due to transitive dependency.
• Defines what a transitive dependency is.
• Expand the example by showing how the data can be
• Mention why transitive dependencies are problematic in rearranged to adhere to 3NF.
database design.
Boyce-Codd Normal Form (BCNF)

What is BCNF? Implications and Next Steps


• BCNF is a higher level of normalization compared to • Converting a table to BCNF may result in more tables
3NF.
with smaller columns.
• It eliminates all the non-trivial functional dependencies.
• Carefully analyze dependencies before applying BCNF to
• Every functional dependency is a candidate key. all tables.

• Consider performance implications and query complexity.


Fourth Normal Form (4NF)

Key Points Example


• 4NF eliminates multiple independent multi-valued • Consider a table that tracks employee projects and the
dependencies.
hours worked. In 4NF, it would be split into separate
• Tables are already in 3NF. tables for each multi-valued dependency.
• Achieved by splitting the table into multiple tables. • You may also include a second example to meet the
minimum of two bullet points.
Fifth Normal Form (5NF)

Key Features of 5NF When is 5NF used?


• More detailed explanation of the characteristics of 5NF • Discuss the specific scenarios or types of data for which
and its impact on data storage.
5NF is necessary.
• Example to illustrate the application of 5NF.
• Compare 5NF with other normal forms and explain when
it is the preferred option.
Denormalization: When and Why?

1 2 3

When to consider denormalization: Why denormalize a database: to Impact on performance:


for performance optimization in read- reduce the number of joins and Denormalization can improve read
performance but may slow down data
heavy applications, when data improve query performance, to
modification operations and increase
modification anomalies are eliminate complex join logic and data redundancy.
acceptable, for easier data retrieval improve read efficiency, to optimize
and reporting. for specific use cases and queries.
Examples of Normalization
Example Tables

● Show a denormalized table with redundant data

● Show the same table normalized into multiple tables with relationships

● Provide a real-world example, such as a company database with


employee and department information
Normalization vs Denormalization

+ Normalization × Denormalization

• Reduces data redundancy and improves data integrity • May require more complex queries and joins for data
• Simplifies data maintenance and updates retrieval

• Minimizes the need for additional storage space • Can impact performance in read-heavy applications

• Not ideal for certain use cases like reporting and


analytics
Benefits of Normalization

1 2 3 4

Reduces data redundancy, Eliminates insertion, Simplifies database design, Supports efficient query
minimizing storage space update, and deletion making it easier to processing, reducing the
maintain and modify the need for complex joins and
and improving efficiency. anomalies, ensuring data
structure. improving performance.
integrity.
Limitations of Normalization

Increased complexity of database schema and queries

Potential performance issues due to a higher number of table joins

More difficult to implement for certain types of applications, such as analytics and reporting

Over-normalization can lead to excessive use of disk space and slower read operations.
Real-world Application of Normalization
Examples of normalization ● Online Retail: Using separate tables for customers, orders, and products to eliminate data redundancy and inconsistencies.
in real-world scenarios
● Financial Services: Storing transaction data in normalized form to ensure data integrity and minimize update anomalies.

● Healthcare Systems: Employing normalization to manage patient records, treatment histories, and medical staff data in a structured, efficient
manner.
Normalization in NoSQL Databases

NoSQL databases often use a form of denormalization to improve read


performance.

Document-based NoSQL databases may store denormalized data within a single


document to reduce the need for complex joins.

Despite the focus on denormalization, NoSQL databases can still benefit from
some level of data normalization, especially in multi-document relationships.
Normalization Practice Questions

Question 1 Question 2 Question 3 Question 4

Explain the concept of First What is the difference When would you choose to Discuss the benefits of
Normal Form (1NF) and between Second Normal denormalize a database?
provide an example of a Form (2NF) and Third What are the potential trade- normalization in a database
table that meets this normal Normal Form (3NF)? offs of denormalization? design. Can you think of
form. Provide a real-world any drawbacks or
scenario to illustrate this limitations?
difference.
Key Points

Normalization is a crucial process in database design to minimize data redundancy and


improve data integrity.

The process of normalization involves organizing data into multiple related tables, following
specific normalization forms.

Denormalization, on the other hand, is the process of intentionally introducing redundancy


for performance or other reasons.
Resources for Further Learning

Articles and
Books Online Courses Practice Datasets
Whitepapers

Recommended books on Links to online courses or Relevant articles and Links to sample databases
database normalization and tutorials on database whitepapers on the for hands-on practice of
normalization and DBMS. importance of normalization.
design.
normalization in databases.

You might also like