Fast review mode: answers are shown by default so you can skim quickly. Hide them if you want to self-test.
Quiz questions on concepts of transaction, storage structures, properties of transaction like atomicity, durability, isolation and their implementations and different querying databases.
A transaction in a database management system (DBMS) is a set of operations that perform a logical task, such as updating, deleting, or inserting data. A transaction is considered a single unit of work that accesses and may modify the contents of a database. Transactions use read and write operations to access data.
To maintain database consistency, transactions must follow ACID properties, which are: Atomicity: All or none of a transaction's operations must be executed Consistency: The database must remain consistent after any transaction
A transaction is usually defined by a set of instructions wrapped by two keywords, such as START TRANSACTION and COMMIT in PostgreSQL and MySQL. A transaction ends with a commit or rollback. A commit updates the data in the database as described in the instructions contained in the transaction. A rollback reverses all transaction steps performed prior to the step that led to the failure.
A transaction can be in one of the following states: Active: The transaction is executing Failed: The transaction failed to complete successfully Abort: The changes made by the transaction are canceled Partially commit: The final statement of the transaction is executed Commit: The transaction completed its execution successfully Terminated: The transaction is finished
For example, a transaction could include depositing money, checking a balance, or reserving tickets.
Join 4M+ learners. Unlock unlimited quizzes, wrong-answer tracking, flashcards + reminders, study guides, and 1-on-1 challenges.