=========================preview======================
(comp334)[2003](s)midterm~PPSpider^solution_10200.pdf
Back to COMP334 Login to download
======================================================
Hong Kong University of Science and Technology
COMP334: Distributed Database Systems
Spring 2003
Midterm Exam
March 24, 2003 Monday 14:00 C 14:50
Student Name: ___SOLUTION___ _ Email:__________________
Student ID:__________________ Lab Section: 12:30/1:30____
Part I (6 points, -1 per incorrect answer)
Part II (4 points)
Part III (10 points + 2 bonus points)
Total (out of 20 points + 2 bonus points)
Useful information
Notation: ASG1 = ASG SJPNO PROJ1
Meaning: ASG semi-joins PROJ1 on attribute PNO and the result is ASG1.
Notation: aff ij (or written as aff (Ai, Aj))
Meaning: The affinity between two attributes Ai and Aj. affij = affji .
Notation: bond (Ai, Aj)
Meaning: The bond between two attributes Ai and Aj. bond (Ai, Aj) = bond (Aj, Ai).
Part I: Multiple choices (6 points, -1 point per incorrect answer)
1. (1 point) What criterion is *not* used in categorizing a DDBMS architectural model?
(A) Autonomy (B) Distribution (C) Heterogeneity (D) Performance
Answer: [D]
2. (1 point) What distributed query optimization algorithm is dynamic (interleaving query execution and query optimization)?
(A) Distributed Ingres (B) R* (C) Hill Climbing (D) SDD-1
Answer: [A]
3. (1 point) What distributed query optimization algorithm considers semi-joins?
(A) Distributed Ingres (B) R* (C) Hill Climbing (D) SDD-1
Answer: [D]
4. (1 point).Tables R and S have 40 and 70 records respectively. The estimated join selectivity of R joining S is 0.5. How may result records are expected?
(A) 20 (B) 35 (C) 1400 (D) 2800
Answer: [C]
5. (1 point) What schema do end users of a distributed DBMS see?
(A)
External schema (B) Global conceptual schema
(C)
Local conceptual schema (D) Local internal schema
Answer: [A]
6. (1 point) In what order does a typical DDBMS query optimizer go through its query processing steps?
...
(A) Data localizationQuery decompositionGlobal optimizationLocal optimzation
...
(B) Query decompositionData localizationGlobal optimizationLocal optimzation
...
(C) Global optimizationQuery decompositionLocal optimzationData localization
...
(D) Query decompositionGlobal optimizationLocal optimzationData localization
Answer: [B]
Part II: Short answers (4 points)
7. (2 points) Write a formula to compute the total cost of a query in a DDBMS query optimizer. The following parameters are given: Tcpu C time of a CPU instruction, T I/O
C time of a disk I/O, Tmsg C fixed time of initiating and receiving a control message, TTR C time of transmitting a byte of data from one site to another, #insts C number of CPU instructions, #msgs C number of control messages, #bytes C number of bytes of data transferred, #results C number of result records generated, and #I/Os C number of disk I/Os.
Answer:
Total cost = Tcpu * #insts + TI/O * #I/Os + Tmsg * #msgs + TTR * #bytes
Note: #results is not used in the formula.
8. (2 points) Su