← Indietro
Altro

Raccolta temi Anno 2017

Altro di Data Bases 2 per il corso di Computer Engineering presso Politecnico di Milano. Materiale proveniente dall’archivio storico Studwiz e classificato per la consultazione online.

Data Bases 2Altro

Informazioni sul documento

Cosa trovi in questo materiale

Altro di Data Bases 2 per il corso di Computer Engineering presso Politecnico di Milano. Materiale proveniente dall’archivio storico Studwiz e classificato per la consultazione online.

Qualità dell’importazione: il testo è stato estratto direttamente dal documento originale.

Contenuti estratti dal documento

Passaggi rappresentativi riconosciuti nelle diverse parti del materiale. Il testo completo resta presente nella pagina per la ricerca, mentre l’anteprima compatta rende più semplice la lettura.

Pagina 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…

Anteprima

Prima pagina del documento.

Prima pagina: Raccolta temi Anno 2017