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 17

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 23

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
The FD preservation problem in BCNF decomposition means that:
Some FDs in the original relation cannot be enforced by checking just one decomposed relation - they would require joining multiple decomposed relations to verify making constraint enforcement expensive
click to copy
In relation R(A,B,C,D,E) with F={AB to C, D to E, C to B} is AD a candidate key?
AD+ = ADE only: start with A,D, apply D to E getting ADE. Cannot reach B or C without them already in the closure. AD does NOT determine all attributes, so AD is NOT a candidate key.
click to copy
What is a trivial functional dependency and why is it excluded from normal form violation checks?
X to Y where Y is a subset of X - it always holds in any relation (by reflexivity) because a set of attributes always determines its own subset providing no real constraint on data
click to copy
What is the union rule derived from Armstrongs axioms?
If X to Y and X to Z then X to YZ (you can combine right-hand sides when the left-hand side is the same)
click to copy
What is Fagans theorem about lossless join decomposition?
A theorem stating that the binary decomposition of R into R1 and R2 is lossless if and only if (R1 intersect R2) multidetermines (R1-R2) OR (R1 intersect R2) multidetermines (R2-R1) holds as an MVD in R
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} what is the attribute closure of E?
E+ = EABCD by E to A to BC to D and CD to E (already have E): E determines all attributes in the relation
click to copy
What is the Armstrong completeness theorem?
Armstrongs axioms are both sound (only derive valid FDs) and complete (can derive ALL valid FDs) meaning F+ computed by Armstrong axioms exactly equals the set of all FDs logically implied by F
click to copy
What is the difference between a FD X to Y being satisfied by a relation instance vs being implied by a set of FDs?
Satisfied by an instance: this specific relation instance happens to have X to Y hold (extensional). Implied by a set F: X to Y holds in EVERY possible instance that satisfies F (intensional) - a much stronger condition capturing the semantics of the schema
click to copy