Normalization for Relational Databases - functional dependencies, normalization - One Line Questions
1.
Which normal form is defined as being in 3NF and having no transitive dependencies of non-prime attributes on any candidate key? —
BCNF
2.
Which normal form is considered the 'all-singing, all-dancing' normal form and is a stronger version of 3NF? —
BCNF
3.
Consider the relation R(EmployeeID, EmployeeName, DepartmentID, DepartmentName). Functional dependencies: EmployeeID -> EmployeeName, DepartmentID -> DepartmentName, EmployeeID -> DepartmentID. Primary Key: EmployeeID. Which normal form is this relation in? —
3NF
4.
Which normal form is considered the most desirable for most practical applications, balancing normalization benefits with performance considerations? —
5.
Consider a relation R(StudentID, StudentName, CourseID, Grade). Dependencies: StudentID -> StudentName, StudentID, CourseID -> Grade. Primary Key: (StudentID, CourseID). Which normal form is this relation in? —
3NF
6.
A relation R(A, B, C) has primary key A, and the functional dependency B -> C exists. If B is not a superkey, this violates which normal form? —
BCNF
7.
Which normal form is primarily concerned with multivalued dependencies? —
BCNF
8.
Which normal form requires that for every non-trivial functional dependency X -> Y, X must be a superkey, AND for every non-trivial multivalued dependency X ->> Y, X must be a superkey? —
4NF
9.
Which of the following functional dependencies violates BCNF in a relation R(A, B, C) with primary key A? —
B -> C
10.
If a relation R(A, B, C) has primary key A, and dependencies A->B and B->C, which is a transitive dependency? —
A -> C
11.
What is a partial dependency? —
A dependency where a non-prime attribute is functionally dependent on only a part of the composite primary key
12.
What is a trivial functional dependency? —
A dependency where Y is a subset of X
13.
What is a superkey? —
A set of attributes that uniquely identifies a tuple (not necessarily minimal)
14.
A deletion anomaly happens when: —
Changing a record unintentionally removes other, unrelated data
15.
An update anomaly occurs when: —
Information needs to be updated in multiple records, and if one is missed, inconsistencies arise
16.
What is the process of decomposing a relation into smaller, well-structured relations called? —
Normalization
17.
If a relation is in 1NF, it means: —
All attributes contain only single, indivisible values.
18.
When decomposing a relation R into R1 and R2, what is the dependency preservation property? —
All functional dependencies of R can be enforced by checking dependencies in either R1 or R2.
19.
A relation is in Third Normal Form (3NF) if it is in 2NF and: —
There are no transitive dependencies of non-prime attributes on the primary key
20.
In the context of normalization, what is a prime attribute? —
An attribute that is part of at least one candidate key
21.
What is a non-prime attribute? —
An attribute that is not part of any candidate key
22.
What is the main challenge with BCNF decomposition if dependency preservation is desired? —
BCNF decomposition may not preserve all dependencies.
23.
Consider a relation Employee(EmpID, EmpName, DeptID, DeptName, ProjectID, ProjectName). If EmpID -> EmpName, DeptID -> DeptName, ProjectID -> ProjectName, and EmpID, DeptID, ProjectID together form the primary key. To achieve 3NF, what decomposition might be necessary? —
Decompose into Employee(EmpID, EmpName, DeptID, ProjectID) and Department(DeptID, DeptName) and Project(ProjectID, ProjectName)
24.
Which of the following is an example of an insertion anomaly? —
It is impossible to add new information about an entity without also having information about another unrelated entity
25.
In a functional dependency X -> Y, what is X referred to as? —
Determinant
26.
Which normal form aims to eliminate transitive dependencies? —
Third Normal Form (3NF)
27.
Which normal form requires that every non-trivial functional dependency X -> Y has X as a superkey? —
Boyce-Codd Normal Form (BCNF)
28.
Which normal form addresses partial dependencies? —
Second Normal Form (2NF)
29.
Consider a relation R(A, B, C) with primary key A and functional dependencies A -> B, A -> C. This relation is: —
In 3NF and BCNF
30.
In the context of normalization, denormalization is the process of: —
Merging tables or adding redundant data to improve query performance
31.
Which of the following is NOT a type of anomaly addressed by normalization? —
Concurrency Anomaly
32.
Which of the following is a characteristic of Boyce-Codd Normal Form (BCNF)? —
Every determinant is a superkey.
33.
If a relation is in 3NF, it means: —
It is free from partial dependencies and transitive dependencies of non-prime attributes on the primary key.
34.
What is the role of the closure of a set of attributes X, denoted X+? —
It is the set of all attributes that are functionally determined by X.
35.
To achieve BCNF, a relation R must satisfy which condition? —
It must be in 3NF and for every non-trivial functional dependency X -> Y, X must be a superkey.
36.
The goal of normalization is to design a database schema that: —
Minimizes data redundancy and avoids anomalies.
37.
Consider a relation Student(StudentID, StudentName, CourseID, CourseName, InstructorID, InstructorName). If StudentID determines StudentName, CourseID determines CourseName, and InstructorID determines InstructorName, but also StudentID, CourseID, InstructorID together form the primary key, what kind of dependencies exist? —
Partial dependencies and functional dependencies
38.
Consider a relation R(A, B, C) with functional dependencies A -> B and B -> C. If A is the primary key, what type of dependency is A -> C? —
Functional Dependency
39.
Consider a relation R(A, B, C, D) with primary key A, and functional dependencies A -> B, B -> C, C -> D. To achieve BCNF, what decomposition is needed? —
R1(A, B, C), R2(C, D)
40.
Consider a relation R(Student_ID, Student_Name, Advisor_ID, Advisor_Name). Dependencies: Student_ID -> Student_Name, Advisor_ID -> Advisor_Name, Student_ID -> Advisor_ID. Primary Key: Student_ID. This relation has a transitive dependency of Student_Name on Student_ID via Advisor_ID. To achieve 3NF, what decomposition is suitable? —
R1(Student_ID, Student_Name, Advisor_ID), R2(Advisor_ID, Advisor_Name)
41.
What is the main problem that normalization aims to solve in databases? —
Data anomalies like insertion, deletion, and update anomalies
42.
What is the 'lossless join' property in database decomposition? —
The decomposition results in relations that can be joined back to form the original relation without any extraneous tuples.
43.
A relation is in 2NF if it is in 1NF and: —
Every non-prime attribute is fully functionally dependent on the primary key
44.
What is the purpose of the Armstrong Axioms in relation to functional dependencies? —
To describe a sound and complete set of inference rules for functional dependencies
45.
What is the primary goal of normalization in a relational database? —
To improve data integrity and reduce redundancy
46.
What is the main purpose of creating candidate keys? —
To identify all possible primary keys for a relation
47.
Which type of dependency states that for any two tuples in a relation, if their values for attribute set X are equal, then their values for attribute set Y must also be equal? —
Functional Dependency
48.
If a relation has a composite primary key (A, B) and an attribute C is dependent on A only (A -> C), this represents a: —
Partial Dependency
49.
Which of the following is a valid inference rule from Armstrong's axioms? —
All of the above
50.
A relation is in First Normal Form (1NF) if it contains only atomic values. What does 'atomic' mean in this context? —
Each attribute value is indivisible and contains a single value