Database Normalization Overview
- 18Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
- spaceFlip card
- KI knew it
- DI didn't know it
- ←Previous card
- →Next card
What is the purpose of database normalization?
To arrange tables, columns, and relationships to avoid data redundancy and attain data integrity, preventing CUD (Create, Update, Delete) anomalies.
Or swipe the card
18 cards
What is the purpose of database normalization?
To arrange tables, columns, and relationships to avoid data redundancy and attain data integrity, preventing CUD (Create, Update, Delete) anomalies.
What does CUD in CUD anomalies stand for?
Create, Update, Delete anomalies.
What are the normal forms covered up to which normalization is considered sufficient?
1NF, 2NF, and 3NF; BCNF (3.5NF), 4NF, 5NF, and 6NF exist but 3NF is generally considered sufficiently normalized.
Give an example of an insert anomaly in a denormalized table.
A new agency 'Free Folks' exists but has no agent yet; because the primary key is AgentId, we cannot insert the agency's data without an agent, causing an insert anomaly.
Give an example of an update anomaly in a denormalized table.
If 'New Cine' agency moves from LA to San Diego and changes phone number, every row with that agency must be updated; if some rows are missed, data becomes inconsistent.
Give an example of a delete anomaly in a denormalized table.
If agent Gori Diamond (the only agent for FireFolks Pvt) is deleted, the agency's information and customer names (Rajini Sir, Saruk Kan) are also lost because they were stored in the same row.
What are the two rules to achieve 1NF?
- Each column must be atomic (single value per column). 2. There must be a primary key (single or composite) that uniquely identifies each row, and no repeating groups of columns.
Why was the FilmAgents table not in 1NF?
It had three customer columns (customer1, customer2, customer3) – a repeating group – and columns were not atomic in terms of storing multiple values.
How was the denormalized FilmAgents table brought into 1NF?
By splitting it into two tables: AgentInfo (AgentId, AgentName, AgencyName, OfficeLocation, OfficeContact) and CustomerInfo (CId, CustName, CustCity, CustPinCode, AgentId as foreign key).
What benefits did achieving 1NF provide?
Unlimited customers per agent (no fixed column limit), ability to sort by customer name (single column), and elimination of insert/delete anomalies on the customer side.
What is the definition of 2NF?
A table is in 2NF if it is in 1NF and all non-key columns are fully functionally dependent on the primary key (i.e., they describe what the primary key identifies).
Why was the AgentInfo table in 1NF not in 2NF?
Because non-key columns (AgencyName, OfficeLocation, OfficeContact) describe the agency, not the agent, so they are not dependent on the primary key AgentId.
How was the database transformed to 2NF?
By splitting AgentInfo into three tables: AgentInfo (AgentId, AgentName, AgencyId), AgencyInfo (AgencyId, AgencyName, OfficeLocation, OfficePhone), and a join table AgentCustomer (AgentId, CustomerId) for many-to-many relationships.
What is the purpose of a join table in database normalization?
To represent many-to-many relationships, e.g., an agent can have many customers and a customer can be represented by many agents; it contains only foreign keys.
What is a transitive dependency?
When a non-key column depends on another non-key column, which in turn depends on the primary key (e.g., CustPinCode depends on CustCity, and CustCity depends on CId).
What is the definition of 3NF?
A table is in 3NF if it is in 2NF and all non-key columns are non-transitively (directly) dependent on the primary key.
Why was the CustomerInfo table in 2NF not in 3NF?
Because CustPinCode depends on CustCity, and CustCity depends on the primary key CId; CustPinCode is transitively dependent on CId.
How was the CustomerInfo table brought into 3NF?
By creating a new table CustomerPinCodes (CustPinCode, CustCity) and linking it to CustomerInfo via a foreign key (CustPinCode), removing the transitive dependency.

Ask anything
We've read this whole study set, so questions about it get the best answers.