Database normalization 1NF 2NF 3NF flashcards
This set of flashcards covers the essentials of database normalization, including the concepts of 1NF, 2NF, and 3NF, along with their importance in relational database design.
Quiz(40 questions)
1. What is the primary purpose of Third Normal Form (3NF) in database design?
Terms in this Study Set(40)
First Normal Form (1NF)(12)
What is First Normal Form (1NF)?
1NF is a property of a relational database table. It requires that each column contains atomic values, and each entry in a column is unique.
True or False: 1NF allows repeating groups in columns.
False. 1NF prohibits repeating groups or arrays in columns, ensuring data is stored in a flat structure.
List the key requirements of 1NF.
- Each column must contain atomic values. - Each record must be unique. - Each column must have unique names.
Fill in the blank: A table is in 1NF if it contains ____ values.
Only atomic values.
How does 1NF affect data redundancy?
1NF reduces data redundancy by ensuring that each piece of data is stored in only one place, eliminating duplicate entries.
Give an example of a table that is not in 1NF.
A table with a 'phone numbers' column containing multiple numbers per entry, like '555-1234, 555-5678'.
What happens when a table violates 1NF?
It can lead to data anomalies, making it difficult to retrieve or manipulate data accurately.
Comparison: 1NF vs. 2NF.
1NF focuses on atomicity and unique entries, while 2NF addresses partial dependencies and requires that all non-key attributes depend on the entire primary key.
What is an atomic value?
An atomic value is a single, indivisible value, such as 'John Doe' or '100' dollars.
True or False: A primary key can have multiple values in 1NF.
False. A primary key must be unique and cannot have multiple values.
How do you convert a table to 1NF?
Identify and separate repeating groups into individual rows, ensuring that all entries are atomic and unique.
Example of a 1NF compliant table.
| ID | Name | Phone | |----|----------|----------| | 1 | John Doe | 555-1234 | | 2 | Jane Doe | 555-5678 |
Second Normal Form (2NF)(14)
What is the definition of 2NF?
Second Normal Form (2NF) eliminates partial dependencies of non-prime attributes on any candidate key.
True or False: A table in 2NF can have partial dependencies.
False. 2NF requires no partial dependencies; all non-prime attributes must depend on the whole key.
How does 2NF relate to 1NF?
- 1NF ensures atomic values - 2NF removes partial dependencies
Give an example of a partial dependency.
If a table has a composite key (A, B) and a non-prime attribute depends only on A, it's a partial dependency.
What is required for a table to be in 2NF?
It must be in 1NF and have no partial dependencies.
Cause → Effect: Why eliminate partial dependencies?
To ensure data integrity and reduce redundancy by making sure non-key attributes depend on the entire key.
List steps to convert a table to 2NF.
- Identify partial dependencies - Separate non-key attributes - Create new tables for each dependency
What are prime attributes?
Attributes that are part of any candidate key in a table.
Fill in the blank: In 2NF, all non-prime attributes must fully depend on the _____.
entire candidate key.
Example: Table with ID, Name, and Course, where Course depends only on ID.
This table is not in 2NF due to partial dependency of Course on ID.
What happens after achieving 2NF?
The table is more structured, reducing data anomalies and improving data integrity.
True or False: 2NF can exist with transitive dependencies.
True. 2NF addresses partial dependencies but not transitive dependencies.
Compare 1NF and 2NF.
- 1NF: Atomic values - 2NF: No partial dependencies
What is the role of a candidate key in 2NF?
It helps identify which attributes should fully depend for a table to meet 2NF requirements.
Third Normal Form (3NF)(14)
What does 3NF address in databases?
Third Normal Form eliminates transitive dependencies, ensuring that non-key attributes depend only on the primary key.
True or False: 3NF allows transitive dependencies.
False. 3NF prohibits transitive dependencies to maintain data integrity.
Define transitive dependency.
A transitive dependency occurs when a non-key attribute depends on another non-key attribute rather than directly on the primary key.
How to achieve 3NF?
- Remove transitive dependencies - Ensure all attributes are dependent only on the primary key.
Provide an example of a transitive dependency.
If 'A' is the primary key, and 'B' depends on 'C', where 'C' depends on 'A', then 'B' is transitively dependent on 'A'.
What is the goal of normalization?
To reduce redundancy and improve data integrity in a database.
Fill in the blank: A table is in 3NF if it is in 2NF and has no _________ dependencies.
transitive
How does 3NF improve data integrity?
By ensuring that every non-key attribute is functionally dependent on the primary key only.
Comparison: 2NF vs 3NF.
2NF removes partial dependencies; 3NF removes transitive dependencies.
What is a non-key attribute?
An attribute in a table that is not part of the primary key.
Example: Table with student grades.
Student_ID (PK), Course_ID, Instructor_Name. Here, Instructor_Name is transitively dependent on Student_ID.
Transitioning to 3NF requires which step?
Decomposing tables to eliminate transitive dependencies.
True or False: 3NF can improve query performance.
True. By reducing redundancy, queries may execute faster.
What is the primary key's role in 3NF?
It uniquely identifies each record, ensuring all other attributes depend only on it.
Questions in this Study Set(40)
1. What is the primary purpose of Third Normal Form (3NF) in database design?
2. What is the main characteristic of a table in Second Normal Form (2NF)?
3. What does it mean for a database table to be in First Normal Form (1NF)?
4. True or False: A table in 3NF can have attributes that depend on other non-key attributes.
5. Which of the following statements is true about Second Normal Form?
6. Which of the following is NOT a requirement for 1NF?
7. What does a transitive dependency imply in a database table?
8. Which of the following is an example of a partial dependency?
9. How does 1NF help in reducing data anomalies?
10. To achieve 3NF, which of the following steps is necessary?
11. Why is it important to eliminate partial dependencies in a database?
12. Fill in the blank: A table is in 1NF if it has ____ values.
13. Which of the following is an example of a transitive dependency?
14. What must be true for a table to be considered to be in 2NF?
15. What is an example of a violation of 1NF?
16. What does normalization aim to achieve in databases?
17. Which scenario demonstrates a table that is NOT in 2NF?
18. Which of the following statements about primary keys in 1NF is true?
19. Fill in the blank: To be in Third Normal Form, a table must first be in Second Normal Form and not have any _________ dependencies.
20. What is the first step in converting a table to 2NF?
21. What effect does violating 1NF have on data retrieval?
22. How does 3NF contribute to better data integrity?
23. True or False: 2NF allows for the presence of transitive dependencies.
24. Which requirement differentiates 1NF from tables that are not in 1NF?
25. What is the key difference between Second Normal Form (2NF) and 3NF?
26. What defines prime attributes in the context of 2NF?
27. When converting a table to 1NF, what is the first step?
28. Which of the following is a non-key attribute?
29. In the context of 2NF, what does the term 'candidate key' refer to?
30. Which of the following tables is in 1NF?
31. In a table with student records, if Student_ID is the primary key, which of these is a transitive dependency?
32. Which of the following statements accurately compares 1NF and 2NF?
33. What is the primary focus of 1NF in database design?
34. What is the effect of achieving 3NF on query performance?
35. After achieving 2NF, what is a likely result regarding data structure?
36. Which scenario demonstrates a table that is NOT in First Normal Form (1NF)?
37. What role does the primary key play in the context of 3NF?
38. Fill in the blank: In 2NF, all non-prime attributes must fully depend on the _____.
39. Which of the following statements is NOT true regarding Third Normal Form (3NF)?
40. Which of the following statements is NOT true about Second Normal Form (2NF)?
Related Study Sets
SQL GROUP BY und HAVING
Transaktionen ACID Definitionen
Wiederholung: Tabelle Schlüssel
SQL WHERE
Abitur: SQL JOIN Idee
SQL subqueries flashcards
SQL GROUP BY and aggregate functions
Relationale Algebra
Create Your Own Study Set
Upload a PDF, paste your notes, or describe a topic – AI generates flashcards, quizzes and more in seconds.

