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 → Transactions 1

ROLLBACK
Undoes changes since last COMMIT or SAVEPOINT
click to copy

DBMS → Introduction to DBMS 24

SAVEPOINT creates
Named marker within transaction for partial rollback
click to copy
UNIQUE constraint prevents
Duplicate non-NULL values in a column
click to copy
CHECK constraint ensures
Column values satisfy a boolean expression
click to copy
ON DELETE CASCADE
Automatically deletes child rows when parent row deleted
click to copy
COALESCE(NULL,NULL,5,10) returns
5
click to copy
NULLIF(5,5) returns
NULL
click to copy
% in SQL LIKE matches
Zero or more characters
click to copy
BETWEEN a AND b is
Inclusive on both ends (a ≤ value ≤ b)
click to copy
WHERE col IN (1,2,3) equals
col=1 OR col=2 OR col=3
click to copy
CASE expression provides
Conditional IF-THEN-ELSE logic within SQL query
click to copy
X→Y (X functionally determines Y) means
For each X value there is exactly one corresponding Y value
click to copy
Armstrong's Reflexivity: if Y⊆X then
X→Y
click to copy
Armstrong's Augmentation: if X→Y then
XZ→YZ
click to copy
Armstrong's Transitivity: if X→Y and Y→Z then
X→Z
click to copy
Armstrong's axioms are
Sound and complete
click to copy
Attribute closure X+ is computed by
Starting with X and iteratively adding attributes determined by FD set F
click to copy
If A+ = all attributes of R(A,B,C,D) then A is
A superkey determining all attributes
click to copy
A canonical cover (Fc) is
Minimal equivalent FD set with no redundancy
click to copy
A prime attribute is
Part of at least one candidate key
click to copy
A non-prime attribute is
NOT part of any candidate key
click to copy
Dependency preservation means
Every FD can be verified from decomposed relations without joins
click to copy
Union rule from Armstrong: if X→Y and X→Z then
X→YZ
click to copy
Decomposition rule: if X→YZ then
X→Y and X→Z
click to copy
Trivial FD X→Y means
Y⊆X (B is a subset of A)
click to copy

DBMS → Normalization 13

Normalization is which database design approach?
Bottom-up
click to copy
1NF requires
All attributes atomic and no repeating groups
click to copy
Which violates 1NF?
Column storing comma-separated multiple phone numbers
click to copy
2NF is violated by
Partial dependencies: non-key attribute depends on part of composite PK
click to copy
3NF is violated when
Non-key attribute transitively depends on PK through another non-key attribute
click to copy
BCNF requires: for every non-trivial FD X→Y
X must be a superkey
click to copy
3NF decomposition guarantees
Both lossless join AND dependency preservation
click to copy
BCNF decomposition guarantees
Lossless join always but may NOT preserve all dependencies
click to copy
4NF eliminates
Multi-valued dependencies (MVDs)
click to copy
5NF eliminates
Join dependencies
click to copy
Insertion anomaly means
Cannot insert certain data without inserting unrelated data
click to copy
Deletion anomaly means
Deleting one row unintentionally destroys other needed information
click to copy
Update anomaly means
Updating one fact requires changing multiple rows causing inconsistency risk
click to copy

DBMS → Joins 2

Lossless-join decomposition means
Join of decomposed relations gives exactly the original relation without spurious tuples
click to copy
Lossless-join condition for R→R1,R2: the condition is
R1∩R2 → R1 OR R1∩R2 → R2 (intersection is superkey in one decomposed relation)
click to copy