Database Normalization Overview
- 20Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
What is the purpose of database normalization?
20 questions
- 1
What is the purpose of database normalization?
Model answer
To arrange tables, columns, and relationships to avoid data redundancy and achieve data integrity, specifically to prevent create, update, and delete (CUD) anomalies.
Explanation
Normalization structures data to minimize duplication and ensure consistency, eliminating anomalies that arise from poorly designed tables.
- 2
List the three types of anomalies that normalization aims to avoid.
Model answer
Create (insert), update, and delete anomalies.
Explanation
These anomalies cause problems when inserting new data, updating existing data, or deleting records, leading to data inconsistency or loss.
- 3
In the denormalized FilmAgents table, which column is the primary key?
Model answer
AgentId.
Explanation
AgentId uniquely identifies each agent row; it is underlined to denote the primary key.
- 4
Explain why the denormalized FilmAgents table suffers from an insert (create) anomaly using the 'Free Folks' agency example.
Model answer
A new agency 'Free Folks' has no agent yet, so there is no AgentId (primary key) to insert the agency's information into the table, making it impossible to store the agency's details.
Explanation
Because AgentId is the primary key and cannot be null, the absence of an agent prevents inserting any record for the agency.
- 5
Describe the update anomaly in the denormalized table using the 'New Cine' agency example.
Model answer
When 'New Cine' moves from LA to San Diego and changes its phone number, the update must be applied to every row where the agency appears (multiple rows) to avoid inconsistent data; missing any row leaves data in an inconsistent state.
Explanation
Data redundancy requires updating the same information in multiple places; if not all are updated, the database becomes inconsistent.
- 6
What problem does the delete anomaly illustrate in the denormalized table?
Model answer
Deleting agent Gori Diamond removes not only the agent but also the corresponding agency (FireFolks Pvt) and its customers because all information is stored in a single row, potentially losing agency data permanently.
Explanation
Since the table combines agent, agency, and customer details, deleting a row eliminates all associated information, even if it should be retained.
- 7
Why is retrieving data, such as finding the agency for a specific customer, problematic in the denormalized table?
Model answer
Because customer names are stored in multiple columns (customer1, customer2, customer3), a query must use OR conditions for each column, and sorting by customer name is ambiguous as there is no single customer column.
Explanation
The multi-column design makes queries cumbersome and sorting impossible without arbitrarily choosing a column.
- 8
What are the two rules of First Normal Form (1NF)?
Model answer
- Each column must contain atomic (single) values, and there cannot be groups of columns representing similar information. 2. There must be a primary key (single column or composite) that uniquely identifies each row.
Explanation
1NF eliminates repeating groups and ensures each cell holds one value; a primary key ensures row uniqueness.
- 9
Why was the original denormalized FilmAgents table not in 1NF?
Model answer
It violated the first rule because it had a group of similar columns (customer1, customer2, customer3) representing multiple customers, and customer names were not atomic (e.g., 'Bread Pith' is atomic but the group of three columns is not).
Explanation
The three customer columns constitute a repeating group, which is prohibited in 1NF.
- 10
How was the denormalized table transformed to satisfy 1NF?
Model answer
The customer information was separated into a new table (CustomerInfo) with columns like CId (primary key), CustName, CustCity, CustPinCode, and a foreign key AgentId to link to the AgentInfo table. This removed the repeating customer columns.
Explanation
By moving customers to their own table, each row holds atomic values, and there is no group of similar columns. Both tables have primary keys.
- 11
What advantages are gained by achieving 1NF in the example?
Model answer
Unlimited customers per agent (no limit of three), sorting by customer name is possible on a single column, and delete anomalies on customer data are avoided (deleting a customer does not affect agent info).
Explanation
1NF resolves the retrieval and deletion issues for customer data, but insertion of an agency without an agent is still problematic.
- 12
Define Second Normal Form (2NF) and its prerequisite.
Model answer
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).
Explanation
2NF builds on 1NF by ensuring that every non-key column provides information directly about the entity identified by the primary key, eliminating partial dependencies.
- 13
Why was the AgentInfo table (after 1NF) not in 2NF?
Model answer
It contained columns (AgencyName, OfficeLocation, OfficeContact) that describe the agency, not the agent (identified by AgentId). Thus, these non-key columns are not dependent on the primary key AgentId.
Explanation
A column like OfficeLocation tells where the agency is, not who the agent is; it should belong to an Agency table.
- 14
How was the database restructured to achieve 2NF?
Model answer
The AgentInfo table was split into three tables: AgentInfo (AgentId, AgentName, AgencyId), AgencyInfo (AgencyId, AgencyName, OfficeLocation, OfficeContact), and CustomerInfo (CId, CustName, CustCity, CustPinCode), plus a join table (AgentId, CId) for many-to-many relationships.
Explanation
Non-key columns describing the agency were moved to AgencyInfo, where they depend on AgencyId. AgentInfo retains only columns directly about the agent and a foreign key to AgencyInfo. The join table handles agent-customer associations.
- 15
What is a transitive dependency, and why is it problematic in 3NF?
Model answer
A transitive dependency occurs when a non-key column depends on another non-key column, which in turn depends on the primary key. In the CustomerInfo table, CustPinCode depends on CustCity, and CustCity depends on CId, making CustPinCode transitively dependent on CId. 3NF forbids such indirect dependencies.
Explanation
Transitive dependencies can lead to redundancy and update anomalies (e.g., updating a city's pin code in multiple rows). 3NF requires every non-key column to be directly dependent on the primary key.
- 16
How was the CustomerInfo table modified to satisfy 3NF?
Model answer
CustPinCode was removed from CustomerInfo and placed in a new table CustomerPinCodes (CustPinCode as primary key, CustCity). The original CustomerInfo now only has CId, CustName, CustCity, and CustPinCode becomes a foreign key referencing the new table.
Explanation
By separating pin code into its own table, CustPinCode becomes a foreign key (not a non-key column), so the transitive dependency is eliminated. Both tables are now in 3NF.
- 17
According to the content, what is the generally accepted level of normalization sufficient for most databases?
Model answer
Third Normal Form (3NF).
Explanation
The content states that if a database is in 3NF, it is sufficiently normalized, though higher normal forms (BCNF, 4NF, 5NF, 6NF) exist.
- 18
In the context of 2NF, what is a non-key column?
Model answer
Any column that is not part of the primary key. In a table with a single-column primary key, all other columns are non-key columns.
Explanation
Non-key columns are those that are not used to uniquely identify rows. They must be dependent on the primary key for 2NF compliance.
- 19
Why is the join table (AgentId, CustomerId) automatically in 2NF?
Model answer
Because it contains only foreign keys; there are no non-key columns to which the 2NF rule applies.
Explanation
2NF concerns only non-key columns. Since the join table consists solely of key columns, it inherently satisfies 2NF requirements.
- 20
What is a composite primary key, and how does it affect the rule for 2NF?
Model answer
A composite primary key is a primary key made up of two or more columns. For 2NF, all non-key columns must be fully functionally dependent on the entire composite key (not just a part of it).
Explanation
The content mentions composite keys as a possibility; full functional dependency means that a non-key column must rely on the whole composite key to be in 2NF.

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