What do PRIMARY KEY and FOREIGN KEY constraints enforce?
A PRIMARY KEY uniquely identifies each row and must be unique and non-null; a FOREIGN KEY enforces a relationship to a key in another table.
Study Database Transactions, Concurrency, and Recovery with 12 free online flashcards. Review key terms, definitions, and concepts with this interactive flashcard deck.
What do PRIMARY KEY and FOREIGN KEY constraints enforce?
A PRIMARY KEY uniquely identifies each row and must be unique and non-null; a FOREIGN KEY enforces a relationship to a key in another table.
What is a lost update?
A lost update occurs when two transactions modify a value based on the same old value and one change overwrites the other.
What practices can reduce the chance of deadlocks?
Access records in a consistent order and keep transactions short. These practices can reduce deadlock risk but cannot guarantee deadlocks will not occur.
How can backups and archived logs support database recovery?
Test that backups can be restored. Where supported, archived transaction logs can enable recovery to a selected point in time.
How does atomicity protect a two-account money transfer?
Atomicity means all operations in a transaction take effect or none do. A transfer should update both accounts in the same transaction.
How do locks and MVCC coordinate concurrent database access?
Locks can make conflicting operations wait. MVCC keeps row versions so readers can often use a consistent earlier view while other transactions make changes.
What does SERIALIZABLE aim to guarantee, and what may an aborted transaction require?
SERIALIZABLE aims to make concurrent transactions behave as if they ran one at a time. If a conflict aborts a transaction, some systems require retrying the whole transaction when safe.
What recovery capability can archived transaction logs provide?
Where the system supports it, archived transaction logs can enable recovery to a selected point in time.
What is a phantom read?
A phantom read occurs when repeating a search returns a different set of rows because another transaction inserted or deleted matching rows.
What trade-off can lower transaction isolation involve?
An isolation level defines which effects of concurrent transactions are prevented. Lower isolation can allow more concurrency but expose more changes between reads.
What are COMMIT and ROLLBACK used for?
A transaction groups database operations into one logical unit; COMMIT completes it, while ROLLBACK undoes it.
What makes a database deadlock a cycle?
A deadlock is a cycle of transactions waiting on one another, each holding a lock needed by another. A database may break the cycle by aborting a transaction.
A progressive guide to how computers encode numbers, text, images, and sound as binary data, including the trade-offs and limits of digital representation.
A 14-question medium-difficulty quiz on Boolean algebra, logic gates, truth tables, and combinational circuits.
A focused set of flashcards covering Python variables, data types, expressions, control flow, functions, input, output, and common programming practices.
Learn how computer memory stores and addresses information, how RAM and ROM differ, and how caches and the memory hierarchy balance speed, capacity, and cost.
A progressive guide to tree structure, binary-tree traversals, binary search tree operations, deletion, balancing, and the way tree height determines time and space costs.
A progression through how data is organized, searched, exposed through software interfaces, and managed through abstraction layers in modern computer systems.
Reviews how interrupts support event handling and multitasking, and how Linux system calls use the RISC-V `ecall` instruction and register conventions.
This quiz covers process management, context switching and scheduling, multitasking, traps and interrupts, and RISC-V privilege transitions.
A quiz on operating-system system calls, including privileged-operation requests, process creation and execution with fork, exec, and waitpid, and signal handling.