数据库管理和编程代写 IMAT3104代写 NoSQL代写 数据库代写
530IMAT3104 Database Management and Programming NoSQL Assessment Coursework 数据库管理和编程代写 Tasks to be undertaken: Here is a summary of the tasks for this coursework: 1. Personalise ...
View detailsSearch the whole station
数据库考试代考 Please use it to answer questions 1 and 2. 1. Is this schedule conflict serializable? a. Yes b. No c. Not sure 2. Which of the following are NOT a
Consider the precedence graph given below:
1. Is this schedule conflict serializable?
a. Yes
b. No
c. Not sure
2. Which of the following are NOT a serializability order for this schedule?
a. T1, T2, T3, T4, T5, T6
b. T1, T2, T4, T6, T3, T5
c. T1, T2, T3, T4, T6, T5
d. T1, T3, T2, T4, T5, T6
e. T1, T3, T2, T4, T6, T5
3. Which statement about the recovery system is correct?
a. If a transaction Ti has modified an item, no other transaction can modify the same item until Ti has committed or aborted.
b. After Redo(Ti) is finished, a log record <Ti abort> should be written out.
c. There is no need to redo or undo a transaction Ti if perform validation check simultaneously.
d. If log record <checkpoint L> exists, then any transaction from L no longer needs to redo or undo during the next recovery.
4. Let ri(A) denote that transaction Ti reads object A and let wi(A) denote that transaction Ti writes object A. Consider the schedule, `w1(A)w2(A)r3(B)w3(B)r1(B)`. Which one of the following graphs is a precedence graph for the schedule?
a. I
b. II
c. III
d. IV
Let ri(A) denote that transaction Ti reads object A and let wi(A) denote that transaction Ti writes object A. Suppose that each of the sequences of actions below is followed by an abort action for transaction T1 . Which of the other transactions would need to be rolled back?
5. w1(A)r2(A)w1(B)r3(B)r4(C)
a. T2 rolls back
b. T3 rolls back
c. T4 rolls back
6. w1(A)w2(A)w1(B)r3(B)r4(A)r4(C)
a. T2 rolls back
b. T3 rolls back
c. T4 rolls back
7. r1(A)w1(B)r2(A)r2(B)r3(A)r4(B)
a. T2 rolls back
b. T3 rolls back
c. T4 rolls back
T1 | T2 | T3 |
read(X) | ||
read(Y) | ||
write(Y) | ||
write(X) | ||
write(X) | ||
write(X) |
8. Is this schedule serializable?
a. Yes
b. No
9. Is this schedule conflict-serializable?
a. Yes
b. No
10. Is this schedule view-serializable?
a. Yes
b. No4
Consider the following schedule involving transactions, T1, T2, T3, and T4. Assume that the transactions are assigned timestamps 1, 2, 3, and 4, respectively.
T1 | T2 | T3 | T4 |
read(Z) | |||
read(X) | |||
read(Y) | |||
read(Y) | |||
read(Z) | |||
write(X) | |||
read(X) | |||
write(Y) | |||
write(Z) |
Using the basic timestamp protocol, which of the transactions will complete, and which will abort?
11. Transaction T1 will …
a. complete
b. abort
c. not sure
12. Transaction T2 will …
a. complete
b. abort
c. not sure
13. Transaction T3 will …
a. complete
b. abort
c. not sure
14. Transaction T4 will …
a. complete
b. abort
c. not sure5
a. Every recoverable schedule is serializable.
b. In a recoverable schedule, if a transaction T commits, then any other transaction that T read from must also have committed.
c. In a recoverable schedule, no transaction will ever be aborted because a transaction that it read from has aborted.
d. None of the above.
16. Which statement is correct?
a. Cascadeless schedules are not recoverable.
b. Schedules are tested for serializability while running the schedule.
c. Shared locks allow reading.
d. Any number of transactions can hold an exclusive lock on an item.
17. Which statement about transactions is NOT correct?
a. To preserve the integrity of data, the database system must ensure each transaction’s atomicity, concurrency, isolation and durability.
b. Multiple transactions are allowed to run concurrently in the system.
c. Concurrency control schemes aim to achieve isolation.
d. Without concurrency control schemes, DB consistency may be destroyed by concurrent transactions.
18. Atomicity of transactions refers to the requirement that
a. each transaction updates exactly one indivisible entity of a database
b. either all operations of the transaction are reflected in the database or none are
c. each transaction preserves the correctness of the database
d. when one transaction executes all other transactions should be made to wait
a. refers to the fact that if a transaction is started in any database state, it leaves the database in a consistent state.
b. ensures that the outputs produced by the transactions will always be consistent.
c. implies that when a transaction does multiple updates, each will be consistent.
d. None of the above.
20. Which of these statements about serializable schedules is true?
a. Every serializable schedule is recoverable.
b. Every serializable schedule contains no conflicting actions.
c. Every 2-phase locking (2PL) schedule is serializable.
d. None of the above.6
21. Which of these statements about recoverable schedules is true?
a. Every recoverable schedule is serializable.
b. In a recoverable schedule, if a transaction T commits, then any other transaction that T read from must also have committed.
c. In a recoverable schedule, no transaction will ever be aborted because a transaction that it read from has aborted.
d. None of the above.
22. Which type of two-phase locking scheme most precisely describes the following schedule?
T1 | T2 |
s-lock(A) | |
read(A) | |
s-lock(A) | |
x-lock(B) | |
read(A) | |
read(B) | |
write(B) | |
commit | |
unlock(B) | |
s-lock(B) | |
read(B) | |
unlock(A) | |
commit | |
unlock(A) | |
unlock(B) |
a. Strict two-phase locking.
b. Rigorous two-phase locking.
c. None of the above.
<T1 start> |
<T1, A, 1, 2> |
<T1 commit> |
<T2 start> |
<T3 start> |
<T2, B, 4, 6> |
<T2, B, 4> |
<checkpoint [T2, T3]> |
<T3, A, 2, 3> |
<T2 abort> |
<T3 commit> |
<T4 start> |
<T4, B, 4, 5> |
23. If the system crashes right after the last log (<T4, B, 4, 5>) has been recorded, which action is NOT necessary in order to recover from this crash? (Note that some other actions may also be needed but are not listed here)
a. Redo T1
b. Redo T2
c. Redo T3
d. Undo T4
24. Which log might be added during question 24’s recovery?
a. <T1, A, 1, 2>
b. <T2, B, 4>
c. <T3, abort>
d. <T4, B, 4>
25. Is the following schedule conflict serializable?
a. Yes
b. No
26.Consider a database with data items X and Y, and assume that there are two transactions T1 and T2. T1 first reads X and Y, and then writes X and Y. T2 reads and writes X, and then reads and writes Y. Is the following schedule serializable?
T1 | T2 |
read(X) | |
read(Y) | |
read(X) | |
write(X) | |
read(Y) | |
write(X) | |
write(Y) | |
write(Y) | |
commit | |
commit |
A) Yes
B) No
We have the following schedule for transaction T1-T4. T1 is the oldest and T4 is the youngest. We are using a validation protocol to ensure the serializability. Please answer which transactions would be rolled back.
T1 | T2 | T3 | T4 |
read(B) | read(C) | ||
read(B) | read(D) | read(D) | |
B = B – 30 | C = C + D | ||
read(A) | <validate> | ||
A = A + 10 | write(C) | ||
read(A) | write(C) | ||
<validate> | <validate> | ||
<validate> | display(C+D) | ||
write(B) | |||
write(A) | |||
display(A+B) | |||
a. T1,T2,T3,T4
b. T2,T3,T4
c. T3,T4
28. Consider a database with objects X and Y, and assume that there are two transactions T1 and T2. T1 first reads X and Y, and then writes X and Y. T2 reads and writes X, and then reads and writes Y. Is the following schedule serializable?
R1(X) -> R1(Y) -> R2(X) -> W2(X) -> R2(Y) -> W1(X) -> W1(Y) -> W2(Y) -> C1 -> C2
a. Yes
b. No
29. Consider the following log information that involves three transactions. Assume that the immediate update protocol with check-pointing is used for crash recovery. And note that the log file does not necessarily record all operations of a transaction.
Is the schedule, as shown in the log, recoverable?
a. Yes
b. No
30. Under the 2-phase locking protocol, which of the following statements is true?
a. Once a transaction has released a lock it can not acquire any more locks.
b. A transaction can release all its locks when it commits.
c. A transaction can acquire all the locks it needs when it begins.
d. all of the above.
更多代写:turnitin代码查重 雅思在家考作弊 英国金融专业作业代做 elsevier润色 speech代写 acca代考
合作平台:essay代写 论文代写 写手招聘 英国留学生代写
IMAT3104 Database Management and Programming NoSQL Assessment Coursework 数据库管理和编程代写 Tasks to be undertaken: Here is a summary of the tasks for this coursework: 1. Personalise ...
View detailsBig Data 大数据作业代写 Question 1 20 Marks A. Outline the steps that a read request goes through, starting when a client opens a file on HDFS (given a pathname) Question 1 20 Marks ...
View details