Document information
- University
- Politecnico di Milano
- Degree programme
- Computer Engineering
- Subject
- Data Bases 2
- Academic year
- 2019-2020
- Classification
- Exam · Full exam
- Content
- Exam paper only
- Original format
- Text
- Searchable text
Full exam for Data Bases 2 in the Computer Engineering degree programme at Politecnico di Milano. The document covers: DATA BASES 2 – JANUARY 17TH, 2020 – DURATION: 2H PROF. SARA COMAI, PROF. DANIELE M. BRAGA A. Active Databases (9 p.) RESOURCE (ResourceID, ReadLocked, Counter, WriteLocked) // Free resources are not stored REQUEST (TransactionID, NumberOfOperation, ResourceID, Operation) //
Full exam for Data Bases 2 in the Computer Engineering degree programme at Politecnico di Milano. The document covers: DATA BASES 2 – JANUARY 17TH, 2020 – DURATION: 2H PROF. SARA COMAI, PROF. DANIELE M. BRAGA A. Active Databases (9 p.) RESOURCE (ResourceID, ReadLocked, Counter, WriteLocked) // Free resources are not stored REQUEST (TransactionID, NumberOfOperation, ResourceID, Operation) //
Import quality: text was extracted directly from the original document.
Representative passages recognised in different parts of the material. The full extracted text remains available to search, while this compact preview makes the page easier to read.
DATA BASES 2 – JANUARY 17TH, 2020 – DURATION: 2H PROF. SARA COMAI, PROF. DANIELE M. BRAGA A. Active Databases (9 p.) RESOURCE (ResourceID, ReadLocked, Counter, WriteLocked) // Free resources are not stored REQUEST (TransactionID, NumberOfOperation, ResourceID, Operation) // Operation=ReadLock|WriteLock|Unlock WAITINGTRANSACTIONS (TransactionID, ResourceID, Timestamp) The tables described above are used to manage locks in a transactional system; for each resource in use, the system stores all the received r-lock/w-lock/unlock requests, and accordingly updates its usage status in table RESOURCE. Depending on the lock status of the resources, the system may grant or deny the lock, or insert the transaction in a waiting queue (where a timestamp is used to represent the waiting order, with higher timestamp s given to transactions being enqueued later). When a waiting transaction reaches a situation such that it can obtain the requested lock, it is removed from the queue. Write a set of triggers that – among all the events and actions that may occur – manage these two specific cases: a) read- lock requests received for a write-locked resource; b) unlock requests received for a write-locked resource. The t riggers shall handle the evolution of the status of the resources and also maintain the queue of waiting transactions. As an example, consider the following situation: X is initially w-locked by T1, and the lock manager receives the requests: read-lock2(X), read-lock3(X), unlock1(X) after the unlock, X will be r-locked by T2 and T3, and the queue will be empty. B Concurrency Control (7 p.) Classify this schedule w.r.t. VSR, CSR, 2PL, 2PL-strict, TS-mono, TS-multi, giving terse but precise justifications: r1(X) r2(Y) w2(X) r1(Y) r3(X) r3(Y) r1(Z) w3(X) w2(Z) C. XML (8 p.)…
First page of the document.