0% found this document useful (0 votes)
18 views6 pages

CS 2203 - Programming Assignment Unit 3

The document discusses database normalization, which organizes data to eliminate redundancy and improve reliability and management. It outlines the steps of normalization from First Normal Form (1NF) to Boyce-Codd Normal Form (BCNF), detailing how to handle functional dependencies and the advantages and drawbacks of higher normal forms. The document emphasizes that while higher normal forms enhance data integrity, they can also complicate database structure and slow down queries.

Uploaded by

khaled.abbara
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views6 pages

CS 2203 - Programming Assignment Unit 3

The document discusses database normalization, which organizes data to eliminate redundancy and improve reliability and management. It outlines the steps of normalization from First Normal Form (1NF) to Boyce-Codd Normal Form (BCNF), detailing how to handle functional dependencies and the advantages and drawbacks of higher normal forms. The document emphasizes that while higher normal forms enhance data integrity, they can also complicate database structure and slow down queries.

Uploaded by

khaled.abbara
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

CS 2203 Databases 1

Programming Assignment Unit 3

Mohamad Alkhaled Abara (Khaled)

University of the People

Dr. Yashika Sharma


What is Normalization and Why it Matters

Normalization is just a way of organizing a database so that information isn’t repeated

unnecessarily. Imagine if you wrote the same book details over and over in a notebook for

every copy you had; normalization is like cleaning that up, so each piece of information is

written only once and linked correctly (Vidhya, Jeyaram, & Ishwarya, 2016).

It’s important because it makes the database:

 Less messy: No repeated data.

 More reliable: Changing one thing doesn’t break other data.

 Easier to manage: Updates, deletions, and additions are simple and don’t create errors.

Normalizing the Books Table

We start with the following table for the library:

Books(Book_ID, Title, Author, Genre, Publisher, Publication_Year, ISBN, Price)

Step 1: First Normal Form (1NF)

First Normal Form requires that every field in the table contains only one value. There should

be no lists or repeated groups inside a single field. The given table already has only single

values in each column, so it is already in 1NF.


Step 2: Second Normal Form (2NF)

Second Normal Form requires that all data in the table depends on the whole primary key and

not just part of it. The primary key in this table is Book_ID because each book has a unique

identifier. Every other attribute, like Title, Author, or Price, depends entirely on Book_ID.

There is no situation where a column depends on only part of the key, so the table is already

in 2NF (Chris, 2022).

Step 3: Third Normal Form (3NF)

Third Normal Form requires that no non-key column depends on another non-key column. In

our table, ISBN determines Title, Author, Genre, Publisher, and Publication_Year. This is

called a transitive dependency because Book_ID determines ISBN, and ISBN determines the

other attributes. To remove this, we split the table into two tables (Allen, 2025):

Books Table:

Books(Book_ID, ISBN, Price)

Book_Info Table:

Book_Info(ISBN, Title, Author, Genre, Publisher, Publication_Year)

Now, the Books table stores the unique book copies and their prices, while the Book_Info

table stores the general information about each book. Each attribute depends directly on the

key of its own table.


Step 4: Boyce-Codd Normal Form (BCNF)

BCNF is stricter than 3NF. It requires that every determinant, which is something that

determines the value of another column, must be a key. In Book_Info, the combination of

Title and Author can determine ISBN and other attributes, but they were not a key in the

previous table. To fix this, we split the table again (Chris, 2022):

Book_Details Table:

Book_Details(Title, Author, ISBN, Publisher, Publication_Year)

Books Table:

Books(Book_ID, ISBN, Price)

Now, every determinant is a key in its own table, and the BCNF rules are satisfied.

How Functional Dependencies Are Handled

At each step of normalization, we address the relationships between data. In 1NF, we ensured

that all data is single and indivisible. In 2NF, we made sure that all attributes depend on the

whole primary key, so there are no partial dependencies. In 3NF, we removed transitive

dependencies by separating book information into its own table. Finally, in BCNF, we

handled cases where non-key attributes were determining other values by creating a separate

table for book details (Vidhya, Jeyaram, & Ishwarya, 2016).


Advantages and Drawbacks of Higher Normal Forms

Achieving higher normal forms like 3NF and BCNF has several advantages. It reduces

repetition and ensures that each piece of data is stored in only one place. This improves the

accuracy and integrity of the database because updates and changes do not cause

inconsistencies. It also makes the database easier to understand and maintain because each

table has a clear purpose (Chris, 2022).

However, there are some potential drawbacks. Higher normal forms often result in more

tables, which means that queries may need to join several tables to get the information

needed. This can make queries slower compared to lower normal forms. It also makes the

database structure more complex, which can be harder to manage for very large systems.

In practice, most databases use 3NF because it balances good organization with reasonable

query speed. BCNF is used when it is very important to remove all possible redundancies,

even if the structure becomes more complex.


References

Vidhya, V., Jeyaram, G., & Ishwarya, K. (2016). Database management systems (pp. 184 till

190). Alpha Science International.

[Link]

Chris, K. (2022, December 21). Database Normalization - Normal Forms 1nf 2nf 3nf Table

Examples

[Link]

Allen, M. (2025, September 22). What is normalization in DBMS (SQL)? 1NF, 2NF, 3NF

example. Guru99.

[Link]

CBT Nuggets. (2021, August 15). How to normalize a database table [Video]. YouTube.

[Link]

Common questions

Powered by AI

Normalization contributes to efficient and error-free management operations by ensuring that each data entity is uniquely and minimally represented in the database . By organizing data into separate tables based on keys, it prevents anomalies where updates, deletions, or additions in one table could inconsistently affect another. This clear structure simplifies data manipulation operations, ensuring consistency and reducing error potential during changes .

The removal of transitive dependencies during normalization, as achieved in 3NF, impacts a database's structure by splitting tables to ensure non-key columns do not depend on other non-key columns . This restructuring decreases redundancy and organizes related data more distinctly, thereby improving data accuracy. However, it may affect performance by requiring more complex queries involving joins, which can slow down query responses due to increased table lookups .

A database designer might choose 3NF over BCNF because 3NF often strikes a better balance between data integrity and performance. While BCNF reduces more redundancies, it requires more complex table structures that can slow down query performance due to additional joins . 3NF provides sufficient organization and integrity for most practical applications without excessive complexity .

Normalization is the process of organizing a database to minimize redundancy and dependency by ensuring that each piece of information is stored only once . It is important because it keeps the database less messy, more reliable by minimizing data anomalies, and easier to manage for updates, deletions, and additions .

Third Normal Form (3NF) removes transitive dependencies, ensuring that non-key columns do not depend on other non-key columns . Boyce-Codd Normal Form (BCNF) is stricter, requiring that every determinant is a key, which means any column that can be used to determine another must itself be a candidate key . Thus, BCNF addresses dependencies that 3NF does not, providing a more robust elimination of redundancies .

Normalization addresses functional dependencies by ensuring that attributes are dependent on the necessary keys throughout all normal forms. In 1NF, all data is made single and indivisible . 2NF eliminates partial dependencies by ensuring attributes depend on the whole primary key, and 3NF removes transitive dependencies to ensure non-key columns do not depend on other non-key columns. In BCNF, each determinant must be a key, handling dependencies comprehensively . This process is necessary to maintain a structured and efficient database free from anomalies .

Database normalization offers advantages in data integrity by ensuring each piece of information is stored only once, thereby minimizing redundancy . This makes updates and changes less prone to introducing inconsistencies. By structuring data into separate, well-defined tables, it reduces potential anomalies during data modification operations, such as insertions, deletions, and updates .

Achieving higher normal forms such as BCNF reduces redundancy and increases data integrity by ensuring that dependencies are only represented once across tables . However, the increased number of tables can lead to complex queries requiring multiple joins, potentially resulting in slower query performance . Additionally, managing a highly normalized database can be more complex and challenging in very large systems .

A database would specifically benefit from BCNF over 3NF in scenarios where it is crucial to remove even minimal redundancies due to highly complex relations between non-key attributes. This is particularly necessary when non-key attributes can determine other attribute values, and these dependencies are critical to the application's functionality or where maintaining integrity through strict dependency adherence significantly impacts data reliability .

Second Normal Form (2NF) improves upon First Normal Form (1NF) by ensuring that every non-key attribute is fully dependent on the whole primary key, eliminating partial dependencies . This means any data related to only a part of the composite key should be moved to a separate table, improving data integrity by relating data through complete keys .

You might also like