UNIVERSITY OF THE PEOPLE (UoPeople)
CS 2203-01 - Databases 1
Lutalo Martin
BSc. Computer Science
CS 2203-01 - AY2025-T4 / Programming Assignment Unit 3
Instructor Baraka Laiza
01st May 2025
Database Normalization: Improving library database design.
Part a: Definition of Normalization in DBMS
Normalization is a methodical process in database management systems (DBMS) that can reduce
redundancy in data, while at the same time improving overall data integrity by structuring tables
efficiently (GeeksforGeeks, 2024). In normalization, a relation is taken and divided into smaller,
interrelated tables that are based on functional dependencies. The intent in normalization is to
enable data operations including insert, update, and delete while, simultaneously, it is paramount
to resolve anomalies (Allen, 2024).
Why is normalization essential?
Eliminates redundancy: Prevents unnecessary duplication of data.
Ensures consistency: Avoids anomalies in database transactions (CBT Nuggets, 2021).
Optimizes queries: Structured tables enhance retrieval speed (StudyTonight, n.d.).
Part b: Normalizing the library database
The original unnormalized relation:
Books(Book_ID,Title,Author,Genre,Publisher,Publication_Year,ISBN,Price)Books (Book\_ID,
Title, Author, Genre, Publisher, Publication\_Year, ISBN, Price)
has repeating groups, meaning it doesn’t comply with First Normal Form (1NF).
Step 1: Converting to 1NF
Requirement: Remove duplicate records and ensure atomicity.
Issue: A single book can have multiple authors and genres.
Solution: Create separate tables:
1. Books(Book_ID, Title, Publisher, Publication_Year, ISBN, Price)
2. Authors(Book_ID, Author)
3. Genres(Book_ID, Genre)
Now, all attributes hold single values per row.
Step 2: Converting to 2NF
Requirement: Remove partial dependencies.
Issue: In Authors(Book_ID, Author) and Genres(Book_ID, Genre), Book_ID is a partial
key, causing partial dependency.
Solution: Create separate tables:
1. Books(Book_ID, Title, Publisher, Publication_Year, ISBN, Price)
2. Authors(Author_ID, Name)
3. Book_Authors(Book_ID, Author_ID)
4. Genres(Genre_ID, Name)
5. Book_Genres(Book_ID, Genre_ID)
Now, no attribute is dependent on part of the primary key.
Step 3: Converting to 3NF
Requirement: Remove transitive dependencies.
Issue: Publisher relies on Book_ID, but Publisher details (like Publisher_Name) should
exist in a separate entity.
Solution: Introduce a Publisher table:
1. Publishers(Publisher_ID, Publisher_Name)
2. Books(Book_ID, Title, Publisher_ID, Publication_Year, ISBN, Price)
No non-key attribute depends on another non-key attribute.
Step 4: Converting to BCNF
Requirement: Ensure every determinant is a key.
Issue: Suppose a publisher controls ISBN assignment independently.
Solution: Introduce a separate relationship table:
1. Books(Book_ID, Title, Publisher_ID, Publication_Year, Price)
2. ISBNs(ISBN, Book_ID)
Now, every functional dependency follows the BCNF rules.
Part c: Explanation of functional dependencies and their resolution
Functional dependencies define the relationship between attributes in a database. They ensure
that each attribute depends entirely on a key attribute, avoiding redundancy and anomalies.
Functional dependencies addressed at each stage
Normal Functional dependencies resolved Solution applied
Form
1NF Book_ID → (Title, Author, Genre, Split multi-valued Author into a
Publisher, Publication_Year, ISBN, separate table.
Price)
2NF Book_ID → Publisher, Separate Publisher and Genre into
Publication_Year (partial dependency different tables.
if Genre depends on Title)
3NF Publisher → Publication_Year (transitive Move Publisher to its own table
dependency) with Publisher_ID.
BCNF ISBN → Title (non-candidate key Create a separate Book_Titles table
dependency) where ISBN is the key.
Part d: Advantages of higher normal forms (3NF and BCNF)
1. Eliminates data redundancy efficiently
By separating data into smaller, well-structured tables, duplicate data storage is
minimized. For example, instead of storing publisher details within multiple book
entries, we maintain a separate Publishers table linked via foreign keys
(GeeksforGeeks, 2024).
This saves storage space and prevents inconsistencies in duplicate records (CBT
Nuggets, 2021).
2. Improves data integrity
Higher normal forms enforce stronger integrity rules, ensuring accurate
relationships between entities (Allen, 2024).
For instance, separating ISBNs into a separate table in BCNF ensures that each
book has exactly one ISBN, preventing accidental duplicate ISBN entries.
3. Prevents update, insert, and delete anomalies
In lower forms (such as 1NF or 2NF), modifying a piece of data might require
multiple changes across the database, leading to update anomalies (StudyTonight,
n.d.).
Example: If the publisher’s contact information changes, BCNF ensures that this
update happens in only one table, rather than modifying multiple rows in a Books
table.
4. Improves query optimization
Since data is divided into smaller, highly relevant tables, indexing becomes more
efficient, enabling faster searches (GeeksforGeeks, 2024).
Example: Searching for all books by a specific author is quicker when a separate
"Book_Authors" table exists, rather than scanning through an unstructured Books
table with multiple authors per row.
5. Supports scalability and future expansion
As new relationships (e.g., author collaborations, digital book formats) emerge, a
well-normalized structure makes integration easier (CBT Nuggets, 2021).
Example: If a new eBook category is introduced, BCNF allows smooth adaptation
by adding a new format table, rather than modifying a cluttered Books table.
Drawbacks of higher normal forms (3NF and BCNF)
1. Increased complexity in query joins
Since normalization splits data into multiple tables, queries often require complex
joins to retrieve all relevant information (GeeksforGeeks, 2024).
Example: Instead of retrieving book details from one table, joining Books,
Authors, and Publishers tables increases computation time.
2. Higher computational overhead
Maintaining relationships via foreign keys requires additional storage and index
management, making inserts and updates slower in highly normalized databases
(StudyTonight, n.d.).
Example: Every new book entry involves inserting data into multiple related
tables (Book, Author, Publisher), increasing processing load.
3. Potential overuse in certain applications
Not all databases require strict normalization; for transaction-heavy databases
(like e-commerce platforms or real-time analytics), some redundancy can improve
speed (Allen, 2024).
Example: Online shopping sites often store user information redundantly to avoid
excessive joins during product recommendations.
4. Greater administrative complexity
Database administrators must carefully manage dependencies, relationships, and
indexing, adding to the complexity of database maintenance (CBT Nuggets,
2021).
Example: If a new data category is introduced, re-normalization might require
modifying multiple existing relationships across tables.
References:
Allen, M. (2024, December 30). DBMS Normalization: 1NF, 2NF, 3NF Database example.
Guru99. https://www.guru99.com/database-normalization.html
CBT Nuggets. (2021, August 15). How to normalize a database Table [Video]. YouTube.
https://www.youtube.com/watch?v=siiYInWniFs
GeeksforGeeks. (2024, December 28). Normalization process in DBMS. GeeksforGeeks.
https://www.geeksforgeeks.org/normalization-process-in-dbms/
Normalization in DBMS - 1NF, 2NF, 3NF, BCNF, 4NF and 5NF | StudyTonight. (n.d.).
https://www.studytonight.com/dbms/database-normalization.php
Brown, F. (2024, June 28). Functional Dependency in DBMS: What is, Types and Examples.
Guru99. https://www.guru99.com/dbms-functional-dependency.html