Document information
- University
- Politecnico di Milano
- Degree programme
- Computer Engineering
- Subject
- Data Bases 2
- Academic year
- 2014-2015
- 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 – JUNE 30TH, 2015 – TIME: 2H 30M PROF. DANIELE M. BRAGA, PROF. STEFANO PARABOSCHI A. Active Databases (9 p.) A cloud storage provider (CSP) stores files in a large pool of disks (order of 10K devices). Each disk i s e i t h e r f r e e o r completely allocated to a
Full exam for Data Bases 2 in the Computer Engineering degree programme at Politecnico di Milano. The document covers: DATA BASES 2 – JUNE 30TH, 2015 – TIME: 2H 30M PROF. DANIELE M. BRAGA, PROF. STEFANO PARABOSCHI A. Active Databases (9 p.) A cloud storage provider (CSP) stores files in a large pool of disks (order of 10K devices). Each disk i s e i t h e r f r e e o r completely allocated to 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.
DATA BASES 2 – JUNE 30TH, 2015 – TIME: 2H 30M PROF. DANIELE M. BRAGA, PROF. STEFANO PARABOSCHI A. Active Databases (9 p.) A cloud storage provider (CSP) stores files in a large pool of disks (order of 10K devices). Each disk i s e i t h e r f r e e o r completely allocated to a specific "bucket" (order of 4K buckets). The CSP customers have APIs to write, read and delete files, based on the file name. A hash function hf() is used on the file name to identify the bucket for the storage. Each file requires a known number of disk blocks, and the allocation of disks to buckets keeps track of the residual free blocks of each allocated disk. The allocation of files to disks is also tracked. F ILE( FileName, RequiredBlocks ) D ISK( DriveId, TotalBlocks ) F ILEMAPPING( FileName, DriveId ) D ISKMAPPING( DriveId, BucketId, FreeBlocks ) Write a trigger system that manages the allocation of disks to buckets, reacting to insertions and deletions on table FILE. Every time a file is added, hf() is applied to the file name to identify the bucket to be used. If the drives already in the bucket have enough capacity, the free capacity is updated and the file can be written. Otherwise, a new drive is added to the bucket. For file deletions, the corresponding number of blocks is freed in the disk/bucket mapping. In case one drive is not needed anymore, due to the release of the blocks, it is returned to the pool of free disks. The trigger system must not, of course, deal with the actual writing of files on disks; it just tracks their allocation to buckets and disks. B. XML (9 p.) <!ELEMENT Lotto ( Event+ )> <!ELEMENT Event ( Date, Extraction+ )> <!ELEMENT Extraction ( City, Number+ )> The traditional Italian Lotto is a gambling game in the form of a lottery, based on the extraction of 5…
First page of the document.