Quick Revision

GK One-Line Question & Answer

15541+ short questions with short answers, covering every category and sub-category on the site — no long articles to scroll through. Good for a fast recap before an exam, or a few minutes of daily practice.

DBMS → Normalization 25

What is the key difference between 3NF decomposition and BCNF decomposition in terms of guarantees?
3NF decomposition always guarantees both lossless join AND dependency preservation; BCNF decomposition guarantees lossless join but may NOT preserve all functional dependencies
click to copy
What is 4NF and what type of anomaly does it address beyond BCNF?
4NF addresses multivalued dependencies (MVDs): a relation is in 4NF if for every non-trivial MVD X multidetermines Y, X is a superkey. MVDs create redundancy even in BCNF relations with independent multi-valued facts
click to copy
What is a minimal cover (canonical cover) of a set of FDs F?
The smallest equivalent set Fc of FDs where all FDs have single attribute RHS, no FD is redundant, and no attribute in any LHS is redundant
click to copy
Consider R(A,B,C) with FDs A to B, B to C, C to A. The candidate keys are:
A, B, and C are all candidate keys (since each determines all others via transitivity forming an equivalence class)
click to copy
What is the synthesis algorithm for 3NF and what are its steps?
An algorithm that: (1) finds minimal cover Fc, (2) creates one relation for each FD in Fc (LHS union RHS), (3) adds a relation for any candidate key if none of the created relations contains one, (4) removes redundant relations
click to copy
What does it mean for a decomposition to be dependency-preserving?
The union of functional dependencies derivable from the projected FDs on each decomposed relation is equivalent to the original set of FDs - meaning all original constraints can be checked locally without joins
click to copy
What is denormalization and in what scenario is it a justified design decision?
Denormalization is the intentional introduction of redundancy by reversing normalization justified when the performance cost of joins in read-heavy workloads significantly outweighs the storage and update overhead
click to copy
What is the insertion anomaly in an unnormalized relation with an example?
The inability to insert a valid piece of information without also inserting other possibly unknown information - e.g. cannot add a new department unless at least one employee in that department exists
click to copy
For R(StudentID,CourseID,InstructorID) where each course has exactly one instructor and each instructor teaches only one course what NF issues arise?
FDs: CourseID to InstructorID and InstructorID to CourseID; candidate keys: StudentID,CourseID and StudentID,InstructorID; CourseID to InstructorID violates BCNF since CourseID is not a superkey yet 3NF holds because InstructorID is a prime attribute
click to copy
What is the deletion anomaly and provide an example?
Deleting a row to remove one piece of information inadvertently destroys other valid information stored in the same row - e.g. deleting the last employee in a department also deletes all information about that department
click to copy
What does it mean for two sets of FDs F and G to be equivalent?
F can derive all FDs in G AND G can derive all FDs in F - meaning they generate the same closure F+ = G+
click to copy
In the context of 2NF what exactly is a prime attribute?
An attribute that is a member of at least one candidate key of the relation
click to copy
Consider normalization of R(A,B,C,D,E,F) with F={A to BCDEF}. This relation is in which normal form?
BCNF and all higher normal forms
click to copy
A relation R has MVDs CourseID multidetermines InstructorID and CourseID multidetermines TextbookID. What does 4NF require?
For each course instructors and textbooks are independent; 4NF requires decomposing into R1(CourseID,InstructorID) and R2(CourseID,TextbookID) to eliminate the cartesian product redundancy
click to copy
What characterizes a transitive dependency in the context of 3NF with a concrete example?
A non-prime attribute Y depending on another non-prime attribute Z which in turn depends on the key X: X to Z to Y where Z is not a superkey - e.g. EmpID to DeptID to DeptName
click to copy
When normalizing to BCNF what algorithm is used and what is the termination condition?
Decomposition algorithm: find a violating FD X to Y (X not a superkey), decompose into R1(X union Y) and R2(R-Y+X), recursively apply until all relations are in BCNF
click to copy
What is a non-trivial functional dependency in formal terms?
X to Y where Y is NOT a subset of X - i.e. Y contains at least one attribute not already in X making the FD actually informative
click to copy
Given FDs A to B, B to A, A to C, B to C - what is the minimal cover?
Fc = A to B, B to A, A to C (since B to C is redundant: B to A to C is derivable so B to C can be removed)
click to copy
What is the practical significance of checking lossless join property when decomposing a relation?
It guarantees that when decomposed relations are joined back together the result is exactly the original relation with no spurious tuples and no missing tuples
click to copy
What is the complementation rule for MVDs?
If X multidetermines Y in relation R(X,Y,Z) where Z=R-X-Y then X multidetermines Z also holds; also every FD X to Y implies X multidetermines Y
click to copy
What does it mean for FD X to Y to be implied by a set of FDs F?
X to Y holds in every relation that satisfies all FDs in F - equivalently X to Y is derivable from F using Armstrong axioms
click to copy
Given R(A,B,C,D) with F={A to B, BC to D, A to C}. Is this in 3NF?
No: candidate key is A (A+ = ABCD). FD BC to D: BC is not a superkey and D is not a prime attribute. This violates 3NF. The relation is in 2NF (PK is single attribute so no partial dependencies) but NOT in 3NF
click to copy
In normalization what is the purpose of the prime attribute exception in 3NF compared to BCNF?
The prime attribute exception allows 3NF to always guarantee a dependency-preserving decomposition even when BCNF cannot; it permits FDs where the RHS is a prime attribute even if the LHS is not a superkey - trading some redundancy for dependency preservation
click to copy
What is the functional dependency graph and how is it used in normalization analysis?
A directed graph where nodes are attributes and directed edges represent FDs (X to Y is an edge from each attribute in X to each attribute in Y); used to identify transitive chains, key derivations, and find canonical covers
click to copy
What is a lossless decomposition test for binary decomposition using FDs?
A binary decomposition of R into R1 and R2 is lossless if and only if (R1 intersect R2) determines (R1 minus R2) OR (R1 intersect R2) determines (R2 minus R1) holds in F
click to copy

DBMS → Functional Dependency 15

Using Armstrongs axioms prove that if X to Y and X to Z then X to YZ (Union rule). Which axioms are used?
Augmentation and Transitivity: X to Y gives XZ to YZ; X to Z gives X to XZ (by reflexivity and augmentation); then XZ to YZ by augmentation gives X to YZ by transitivity
click to copy
Given FDs A to B, B to C, A to D, D to E - compute A+ (attribute closure of A).
A+ = ABCDE (A to B to C, A to D to E, so A determines all)
click to copy
Given R(A,B,C,D) and FDs F={AB to C, C to D, D to A} what are ALL candidate keys?
AB, BC, and BD (compute closures: AB+ = ABCD, BC+ = ABCD, BD+ = ABCD; check minimality: no proper subset works for each)
click to copy
What is the decomposition rule derived from Armstrongs axioms?
If X to YZ then X to Y and X to Z (you can split the right-hand side - derived from Reflexivity and Transitivity)
click to copy
Given F={X to YZ, XY to W, W to V} is the FD X to W derivable from F?
Yes: X to YZ (given), so X to Y (decomposition), then X to XY (augmentation), XY to W (given), X to W by transitivity
click to copy
What is extraneous attribute in the context of finding a minimal cover?
An attribute A in the LHS of an FD X to Y such that removing A still preserves the equivalence: (F minus FD) union ((X-A) to Y) is equivalent to F
click to copy
What is the pseudotransitivity rule derived from Armstrongs axioms?
If X to Y and WY to Z then WX to Z (a generalization of transitivity where the intermediate attribute set Y is augmented with W on both sides)
click to copy
In relation R(A,B,C,D,E) with F={A to BC, CD to E, B to D, E to A} is E to D derivable?
Yes: E to A (given), A to BC (given), B to D (given); E to A to B to D, so E to D by transitivity chain
click to copy
What distinguishes a trivial from a non-trivial multivalued dependency?
X multidetermines Y is trivial if Y is a subset of X or X union Y equals the entire attribute set of the relation (trivial MVDs always hold and convey no information)
click to copy
What is the complementation rule for MVDs stated formally?
If X multidetermines Y in relation R(X,Y,Z) where Z=R-X-Y then X multidetermines Z also holds; also every FD X to Y implies X multidetermines Y
click to copy
Given R(A,B,C) and FDs F={A to B, B to C} compute the canonical cover Fc.
Fc = A to B, B to C (A to C is redundant since it is derivable; both remaining FDs are necessary and have no redundant attributes)
click to copy
In the context of FDs what is the inference closure F+ of a set F?
The set of ALL functional dependencies that can be logically derived from F using Armstrongs axioms - the complete set of FDs that hold in every relation satisfying F
click to copy
What does it mean for a set of FDs F to cover a set G and how is this tested?
F covers G (G is a subset of F+) if every FD X to Y in G can be derived from F - tested by checking if Y is a subset of X+ computed under F for each FD in G
click to copy
What is the difference between full functional dependency and partial functional dependency?
X to Y is a full FD if removing any attribute from X breaks the FD (Y no longer depends on X); partial if Y still depends on some proper subset of X
click to copy
Given R(Supplier_ID,Part_ID,Project_ID,Quantity) with FD Supplier_ID,Part_ID,Project_ID to Quantity - are there other FDs that must be assumed?
No other FDs are specified; the composite key is the only determinant of quantity placing the relation in BCNF assuming no other FDs exist
click to copy