Document information
- University
- Politecnico di Milano
- Degree programme
- Computer Engineering
- Subject
- Data Bases 2
- Academic year
- 2024-2025
- 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: Check if 30% reduction: ◻ Last name: First name: Pers. code: Signature: Databases 2 - exam - January 15, 2025 - Dur. 2h S. Comai, P. Fraternali, D. Martinenghi Students with 30% reduction can omit: Exercise 2: point 3 Exercise 1: VSR classification - Exercise 3: point 3 A.
Full exam for Data Bases 2 in the Computer Engineering degree programme at Politecnico di Milano. The document covers: Check if 30% reduction: ◻ Last name: First name: Pers. code: Signature: Databases 2 - exam - January 15, 2025 - Dur. 2h S. Comai, P. Fraternali, D. Martinenghi Students with 30% reduction can omit: Exercise 2: point 3 Exercise 1: VSR classification - Exercise 3: point 3 A.
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.
Check if 30% reduction: ◻ Last name: First name: Pers. code: Signature: Databases 2 - exam - January 15, 2025 - Dur. 2h S. Comai, P. Fraternali, D. Martinenghi Students with 30% reduction can omit: Exercise 2: point 3 Exercise 1: VSR classification - Exercise 3: point 3 A. Concurrency control (11 points) Consider the following arrival sequence AS, decorated with lock and unlock requests: AS = S1(b) S1(c) r1(b) X2(b) w2(b) X2(a) r2(a) w2(a) r1(c) U1(c) U1(b) X2(c) r2(c) w2(c) U2(c) U2(b) U2(a) S1(a) r1(a) U1(a), where Si(z) indicates a shared lock request by transaction i on resource z, and similarly for Xi(z) (exclusive lock) and Ui(z) (unlock). Let H be the history or a-posteriori sequence (without the indication of lock and unlock requests) derived from AS by a scheduler that grants locks whenever possible, or else puts the requesting transaction on hold until the requested resource becomes free. Every request in AS must be processed, regardless of whether the transaction issuing the request is currently waiting on other resources. 1. Show H. Is H guaranteed to avoid all anomalies? Explain. [2 points] 2. Classify H with respect to VSR, CSR, 2PL, Strict 2PL, TS Mono, and TS Multi (with the conventions adopted for TS Multi under Snapshot Isolation, used for the exercises). Justify your answers concisely (determine membership via class inclusion wherever possible). [up to 1.5 points per class] If more space is needed, use the extra space (last page) B. Ranking (10 points) Consider the following dataset D of hotels with their distances to points of interest (train station ts and concert hall ch). ts ch a 0.30 0.80 b 0.55 0.45 c 0.70 0.30 d 0.40 0.90 e 0.60 0.20 f 0.60 0.90 g 0.90 0.15 h 0.50 0.70 i 0.80 0.10 ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ 0.0 0.2 0.4 0.6 0.8…
First page of the document.