0% found this document useful (0 votes)
18 views2 pages

Week5 Solution

The document discusses ACID properties of databases and transactions. It provides multiple choice and fill in the blank questions about transaction concepts like durability, isolation, locks, logs, rollbacks, commits, and consistency. Additional questions cover the implications of a transaction being a logical unit of work, why databases need their own cache management, what constitutes a consistent database state and how it is achieved, and the main types of concurrency control and when each would be preferred.

Uploaded by

Sadiholic
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views2 pages

Week5 Solution

The document discusses ACID properties of databases and transactions. It provides multiple choice and fill in the blank questions about transaction concepts like durability, isolation, locks, logs, rollbacks, commits, and consistency. Additional questions cover the implications of a transaction being a logical unit of work, why databases need their own cache management, what constitutes a consistent database state and how it is achieved, and the main types of concurrency control and when each would be preferred.

Uploaded by

Sadiholic
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Weekly exercises 5

1. List and discuss the ACID characteristics

2. Fill in the blanks / Multiple-choice questions


1. __ ensures that once transaction changes are done, they cannot be undone or lost,
even in the event of a system failure.
durability
2. If several concurrent transactions are executed over the same data set and the
second transaction updates the database before the first transaction is finished, the
__ property is violated and the database is no longer consistent.
isolation
3. Deadlocks are possible only when one of the transactions wants to obtain a(n) __ lock
on a data item.
exclusive
4. A DBMS uses a transaction __ to keep track of all transactions that update the
database.
log
5. When a program is abnormally terminated, equivalent of a __ command occurs.
rollback
6. In a(n) __ backup of the database, only the last modifications to the database are
copied.
differential
7. A __ database state is one in which all data integrity constraints are satisfied. fixed,
consistent
8. The __ statement is used to end a successful transaction.
commit
9. __ means that the data used during the execution of a transaction cannot be used by
a second transaction until the first one is completed.
isolation
10. All transactions are controlled and executed by the DBMS (subject to some limitations)
to guarantee database __.
integrity
11. __ will check whether all the operation of a transaction completed or none.
consistency
3. What does the statement ‘a transaction is a logical unit of work’ imply?
Ans. It means that a transaction must be entirely completed or aborted, allowing no other
intermediate steps. If a transaction composes of several DB requests, all of these steps
must be fulfilled to ensure acceptance of the transaction.
4. Why the DB needs its own cache management?
Ans. The DBMS knows more about its queries and can choose which individual blocks it
caches. It helps control writing back to disk better

5. What is a consistent DB state? How is it achieved?


Ans. A consistent database state is one in which all data integrity constraints are satisfied.
It is achieved by taking the DB from one consistent state to another, appropriately taking
care of each transaction.

6. What are the main types of Concurrency control? In what situation would you prefer one
over another?
Ans.
Optimistic: interactions carried on; prohibited interactions are cleared by rollback.
Pessimistic: no prohibited interactions are allowed to occur in the first place occur, hence
limited parallelism.
Benefit of optimistic: If things rarely go wrong, we won’t have to do extra work.
Benefit of pessimistic: If things do often go wrong, we don't have loads of rollbacks.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy