DBMS Basics Practice Test: Transactions — Flashcards | Databases | FatSkills

DBMS Basics Practice Test: Transactions — Flashcards

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.

1 of 90 Ready
Consider money is transferred from (1)account-A to account-B and (2) account-B to account-A. Which of the following form a transaction?
Both 1 and 2 individually
Shortcuts
Prev Space Show / hide Next
Turn this into a study set.
Sign in with Google to save tricky questions to your reminder list and resume on any device.
Sign in with Google Free • no extra password