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 1

Fix for EmpID→DeptID→DeptName (3NF violation) is
Create Dept(DeptID,DeptName) and Emp(EmpID,DeptID)
click to copy

DBMS → Introduction to DBMS 29

A relation with ONLY one attribute is always in
BCNF
click to copy
Isolation ensures
Concurrent transactions do not interfere with each other
click to copy
Dirty read occurs when
T1 reads data written by uncommitted T2 (invalid if T2 rolls back)
click to copy
Non-repeatable read occurs when
Same row read twice gives different values because another transaction modified it between reads
click to copy
Phantom read occurs when
New rows APPEAR in repeated range query inserted by another transaction
click to copy
2PL growing phase
Only acquires locks (no releasing allowed)
click to copy
2PL shrinking phase
Only releases locks (no new acquisitions allowed)
click to copy
2PL guarantees
Conflict serializability
click to copy
Strict 2PL holds exclusive locks until
Transaction COMMITS or ABORTS
click to copy
Two operations conflict when
Same data item, different transactions, at least one is a WRITE
click to copy
Wait-Die scheme: T_i requests lock held by T_j
Older T_i waits; younger T_i aborts (dies)
click to copy
Wound-Wait scheme: T_i requests lock held by T_j
Older T_i wounds (aborts) T_j; younger T_i waits
click to copy
MVCC keeps multiple versions to
Allow readers and writers to proceed without blocking each other
click to copy
READ UNCOMMITTED isolation
Allows ALL anomalies (dirty, non-repeatable, phantom) - lowest isolation, highest concurrency
click to copy
READ COMMITTED isolation
Prevents dirty reads but allows non-repeatable and phantom reads
click to copy
REPEATABLE READ isolation
Prevents dirty and non-repeatable reads but may allow phantom reads
click to copy
Shared (S) lock allows
Multiple concurrent readers no writers
click to copy
Exclusive (X) lock allows
ONE transaction to read or write blocking all others
click to copy
Write-Ahead Logging (WAL) requires
Log written to stable storage BEFORE data page written to disk
click to copy
Redo in recovery
Re-applies operations of committed transactions to ensure durability after crash
click to copy
Undo in recovery
Reverses operations of uncommitted transactions to restore consistency
click to copy
ARIES recovery passes in order
Analysis, Redo, Undo
click to copy
Checkpoint in recovery is used to
Reduce redo work needed after crash
click to copy
No-Force policy means
Pages need NOT be forced to disk at commit - requires REDO on recovery
click to copy
Steal policy means
Dirty pages of uncommitted transactions CAN be written to disk - requires UNDO on recovery
click to copy
Optimistic CC performs best when
Conflicts are RARE - mostly reads few conflicts
click to copy
Multiple granularity locking allows
Different hierarchy levels: database, table, page, row
click to copy
IS (Intention-Shared) lock signals
Intent to set S locks at FINER granularity levels
click to copy
IX (Intention-Exclusive) lock signals
Intent to set X locks at FINER granularity levels
click to copy

DBMS → Transactions 6

ACID stands for
Atomicity,Consistency,Isolation,Durability
click to copy
Atomicity ensures
Transaction happens in entirety or not at all
click to copy
Consistency ensures
DB transitions from one valid state to another maintaining all integrity constraints
click to copy
Durability ensures
Once committed changes persist permanently even after system failures
click to copy
Cascading rollback occurs when
Rolling back T1 forces other transactions that read T1's dirty data to also roll back
click to copy
Timestamp-based CC assigns each transaction
Unique timestamp at start time for ordering operations
click to copy

DBMS → Concurrency Control 2

A schedule is conflict serializable if
Its precedence graph is ACYCLIC (no cycles)
click to copy
SERIALIZABLE isolation
Prevents ALL anomalies - highest isolation, lowest concurrency
click to copy

DBMS → Deadlock 2

Deadlock occurs when
Two or more transactions wait indefinitely for each other to release locks (circular wait)
click to copy
Wait-for graph detects deadlock when
A CYCLE is detected in the graph
click to copy