Back
Other

Raccolta temi Anno 2017

University study material for Data Bases 2 in the Computer Engineering degree programme at Politecnico di Milano. The document covers: DATA BASES 2 – FEBRUARY 9TH, 2017 – TIME: 2H 30M PROF. DANIELE M. BRAGA, PROF. STEFANO PARABOSCHI A. Active Databases (10 p.) A database supports a bibliographic system managing publications and their citations. PAPER (PapId, Title, Venue, ReceivedCitations) CITE (SourcePapId,

Data Bases 2Other

Document information

What's included in this study material

University study material for Data Bases 2 in the Computer Engineering degree programme at Politecnico di Milano. The document covers: DATA BASES 2 – FEBRUARY 9TH, 2017 – TIME: 2H 30M PROF. DANIELE M. BRAGA, PROF. STEFANO PARABOSCHI A. Active Databases (10 p.) A database supports a bibliographic system managing publications and their citations. PAPER (PapId, Title, Venue, ReceivedCitations) CITE (SourcePapId,

Import quality: text was extracted directly from the original document.

Extracted content from the 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.

Page 1

DATA BASES 2 – FEBRUARY 9TH, 2017 – TIME: 2H 30M PROF. DANIELE M. BRAGA, PROF. STEFANO PARABOSCHI A. Active Databases (10 p.) A database supports a bibliographic system managing publications and their citations. PAPER (PapId, Title, Venue, ReceivedCitations) CITE (SourcePapId, TargetPapId) AUTHOR (AuthId, Name, Affiliation, ReceivedCitations, H_index) AUTHORSHIP (PapId, AuthId, AuthorPosition) Papers are inserted into the database together with the citations made to other papers. An H_index for an author a is the largest value h such that a has authored h publications, each cited at least h times. We assume there is a (relatively expensive) SQL function HIDX(AuthId) that returns the H index for the author whose Id is passed as parameter. Design a set of triggers to react to insertions into CITE and update the ReceivedCitations for the papers and the corresponding authors (each author gets all the citations of the papers he authored). The triggers should parsimoniously invoke the HIDX function, using it only when there is a real possibility that the HIDX may change due to the insertion of a citation for a paper. Describe (not necessarily writing the corresponding triggers) how triggers can manage deletions of citations, and discuss the termination of the trigger system. B. Concurrency Control (5 p.) Consider the following sequence of operations requested to a database server: r1(x) r1(y) r2(x) r2(y) w1(x) w2(y) 1) Does the execution produce a deadlock? 2) Would the use of the Update Lock have an impact on the behavior of the system? Motivate the answer. 3) Consider now the sequence as a schedule (i.e., as an ex-post commit-projection of already executed operations). Classify the schedule wrt CSR, 2PL, TS-mono/-multi. Would the 2PL classification be derivable from the…

Preview

First page of the document.

First page: Raccolta temi Anno 2017