Section 1

Preview this deck

What is a lock, and how, in general, does it work?

Front

Star 0%
Star 0%
Star 0%
Star 0%
Star 0%

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Active users

0

All-time users

0

Favorites

0

Last updated

6 years ago

Date created

Mar 1, 2020

Cards (11)

Section 1

(11 cards)

What is a lock, and how, in general, does it work?

Front

A lock is a mechanism used in concurrency control to guarantee the exclusive use of a data element to the transaction that owns the lock. For example, if the data element X is currently locked by transaction T1, transaction T2 will not have access to the data element X until T1 releases its lock.

Back

Explain the following statement: a transaction is a logical unit of work.

Front

A transaction is a logical unit of work that must be entirely completed of aborted; no intermediate states are accepted. In other words, a transaction, composed of several database requests, is treated by the DBMS as a unit of work in which all transaction steps must be fully completed if the transaction is to be accepted by the DBMS.

Back

Why might it take a long time a long time to complete transactions when using an optimistic approach to concurrency control?

Front

Because the optimistic approach makes the assumption that conflict from concurrent transactions is unlikely, it does nothing to avoid conflicts or control the conflicts.

Back

What is a scheduler, what does it do, and why is its activity important to concurrency control?

Front

The scheduler is the DBMS component that establishes the order in which concurrent database operations are executed. In other words, the scheduler guarantees that the execution of concurrent transactions will yield the same result as though the transactions were executed one after another.

Back

What is concurrency control, and what is its objective?

Front

Concurrency Control - Coordination of the simultaneous transactions execution in a multiuser database system Concurrency Control is important to data integrity because it has the problems of (1) Lost Update, (2) Uncommitted Data, (3) Inconsistent Retrievals, but the most important problem is the Lost Update problem

Back

List and discuss the five transaction properties.

Front

(1) Atomicity - All operations of a transaction must be completed, otherwise the transaction is aborted (2) Consistency - Permanence of database's consistent state (3) Isolation - Data used during transaction cannot be used by second transaction until the first is completed (4) Durability - Ensures that once transactions are committed, they cannot be undone or lost (5) Serializability - Ensures that the schedule for the concurrent execution of several transactions should yield consistent results

Back

What is a consistent database state and how is it achieved?

Front

A consistent database state is one in which all data integrity constraints are satisfied. To achieve a consistent database state, a transaction must take the database from one consistent state to another.

Back

What is an exclusive lock, and under what circumstances is it granted?

Front

An exclusive lock is one of two lock types used to enforce concurrency control. (A lock can have three states: unlocked, shared (read) lock, and exclusive (write) lock. The "shared" and "exclusive" labels indicate the nature of the lock.)

Back

The DBMS does not guarantee that the semantic meaning of the transaction truly represents the real-world event. What are the possible consequences of that limitation? Give an example

Front

The database is designed to verify the syntactic accuracy of the database commands given by the user to be executed by the DBMS. The DBMS will check that the database exists, that the referenced attributes exist in the selected tables, that the attribute data types are correct, and so on.

Back

What is a transaction log, and what is its function

Front

Transaction Log - Record of essential data for each transaction processed against the database Function: A DBMS uses the information stored in a transaction log for (1) Recovery requirements triggered by ROLLBACK statements (2) A program's abnormal termination, (3) A system failure, in which it will record the time of the system failure

Back

What are some disadvantages of time-stamping methods for concurrency control?

Front

Disadvantages include: (1) Each value stored in the database requires two additional stamp fields (for when the transaction occurs and when the transaction finishes) (2) Increases memory needs (3) Increases the database's processing overhead (4) Demands a lot of system resources

Back