Professional Documents
Culture Documents
ADBMSFinal Exam 2016
ADBMSFinal Exam 2016
Attention
Make sure the exam paper contains 7 pages including the cover page.
The question paper contains 33 questions in 4 parts.
Answer the question according to the instructions given for each part.
Write your Name and Id No. on each page of the question paper.
Write your answer neatly on the space provided.
Use of pencils and red pens are not allowed.
Mobile phone Must be switched off.
Cheating in any form will be punished without prior notice.
Don’t put any symbol on the question paper unless you will lose 1 mark for each symbol.
Detaching the question papers is also treated as malpractices
Page | 1
RAYA UNIVERSITY
Instructions: Write TRUE if the statement is correct and FALSE if it is incorrect on the attached
answer sheet [7 Points]
Page | 2
PART II: MULTIPLE CHOICE ITEMS
Instructions: This item of exam contains 12 multiple choice questions, each worth 1 point.
Choose the best answer from the given alternatives & write the choice of the correct letter on
the space provided. Make sure that your answer is clearly marked. Use only capital Letters. [12
Points]
1. Which of the following makes the transaction permanent in the database?
A. Transaction View B. Commit C. Rollback D. All of the above
2. If a transaction changes the database and is committed, the changes must never be lost because of
subsequent failure. This statement will indicate that.
A. Atomicity B. Consistency C. Isolation D. Durability
3. In context of two phase locking protocol, which of the following statement is correct?
A. Growing phase occurs after shrinking phase
B. In shrinking phase, transaction can obtain as well as release lock but in growing phase, it can
only obtain locks.
C. In growing phase, transaction can obtain as well as release lock but in shrinking phase, it can only
obtain locks.
D. In growing phase, transaction can obtain locks and in shrinking phase, it can only locks.
4. In perspective of database, let T1 and T2 are two concurrent transactions. Consider the following
sequence of operations on data item D. T1: R(D) T1:W(D) T2: R(D) T2: W(D) this kind of
problem is known as ____________
A. Dirty read B. Lost update C. Incorrect summery D. Unrepeatable read
5. From the following schedules identify which is serial schedule?
A. R1R2 W1 W2 B. R1W1 R2W2 C. R2R1 W2W1 D. R2R1 W1W2
6. From the following alternatives identify the wrong one about purposes of concurrency control
A. One transaction is not interleaving another transaction
B. To preserve database consistency
C. To resolve Read-Write, write-read and Write-Write conflict.
D. To resolve Read-Read, write-read and Write-Write conflict.
7. _____________is another problem occurs when a transaction cannot proceed for an
indefinite period of time while other transactions in the system continue normally
A. Deadlock B. Starvation C. Dealing with Deadlock D. Phase lock
Page | 3
8. Consider the following schedules involving two transactions. S1: R1(X); R1(Y); R2(X);
W2(Y); W1(X) and S2: R1(X); R2(X); W2(Y); R1(Y); W1(X) then which one of the
following statements is correct with respect to S1 and S2?
A. Both S1 and S2 are conflict serializable
B. Both S1 and S2 are not conflict serializable
C. S1 is conflict serializable and S2 is not conflict serializable
D. S1 is not conflict serializable and S2 is conflict serializable
9. ______is a sudden and total failure from which recovery is impossible. Such as disk crash.
A. Non catastrophic failure B. Catastrophic failure C. System failure D. None
10. Among the following statements which is Not True about conversion of locks?
A. Upgrading means convert Read-lock to Write-Lock
B. Upgrading means from convert shared to exclusive lock.
C. Upgrading means convert from Write lock to Read-lock.
D. Downgrading from exclusive lock to shared lock
E. All of the above
11. Which recovery techniques used to manage access of data items by concurrent transactions,
two directories?
A. Deferred update B. Shadow paging C. immediate update D. None of the mentioned
12. Which of the following is Not found in ARIES Recovery Algorithm?
A. Analysis B. Undo C. Redo D. force write
Instructions: This item of exam contains 6 fill the blank type questions, each worth 1 point.
Write the correct terminology or concept that fills the blank space on the space provided. [6 Pts]
1. _______________________ is execute some commands from one process, then suspend that
process and execute some commands from the next process.
2. _______________________ is unable to complete all the read and write and hence will undo
the operations that were performed till that point.
3. ________________________a sequence of instructions that specify the chronological order
in which instructions of concurrent transactions are executed.
4. ______________________is the process of managing simultaneous operations on the shared
database without having them interfere with each other.
5. A transaction T1 waiting transaction T2 to release lock y and transaction T2 also waiting
transaction T1 to release lock on x. This state is known as ____________________________
6. _______________is the process of restoring the database to the most recent consistent state
that existed just before the failure.
PART IV: WORKOUT ITEMS
Instructions: This item contains 5 questions. Read the questions carefully and then analyze
each question so that you're sure you understand what they mean and answer the questions
correctly. Try to write neatly as you go. [24 Points]
1. Identify the type of problem with the following concurrent execution. And suggest how we
could prevent it. (3 pt) T1 T2
Lock-x(X)
X=x+y
Lock-x(Y)
Y=y-x
Lock-s(y) Lock-s(x)
2. Assume you have two accounts CBE and Anbesa bank then write a transaction to transfer
Birr 500 from your CBE account to your Anbesa bank account: (4 pt)
3. What is the purposes of Concurrency control? (3 pt)
4. Write at least four features of distributed database? (3 pt)
5. What is the difference between homogeneous DDBMS and heterogeneous DDBMS? (4 pt)
6. Create a function which gives you the maximum of two integers. (3 pt)
7. Write the syntax of SQL User defined functions (2 pts each)
a. Scalar user defined functions
b. Inline table valued functions
c. Multi statements table valued functions
RAYA UNIVERSITY
ANSWER SHEET