程序代写代做 html C 02/05/2020

02/05/2020
COMP9315 14s2
COMP9315 14s2 Final Exam
The University of New South Wales
COMP9315 DBMS Implementation Final Exam 14s2
[Instructions] [Notes] [PostgreSQL] [C] [Q1] [Q2] [Q3] [Q4] [Q5] [Q6] [Q7] [Q8]
DBMS Implementation
Question 7 (8 marks)
Consider a relation R(a,b,c) implemented as a multi-attribute hashed file, with the following
properties:
the file has b = 256 pages, so the least significant 8-bits of the hash values are used
choice vector: (bit 0 is the least significant bit)
bit 0 in the tuple hash comes from bit 0 of the bit 1 in the tuple hash comes from bit 0 of the bit 2 in the tuple hash comes from bit 0 of the bit 3 in the tuple hash comes from bit 1 of the bit 4 in the tuple hash comes from bit 2 of the bit 5 in the tuple hash comes from bit 1 of the bit 6 in the tuple hash comes from bit 1 of the bit 7 in the tuple hash comes from bit 3 of the
query distribution:
Q1: select * from R where a = k,
Q2: select * from R where b = j,
Q3: select*fromRwherea=kandb=j, Q4: select*fromRwhereb=jandc=m, Q5: select*fromRwherea=kandc=m,
where k, j and m are constants of the appropriate type Based on the above, answer the following:
a. How many pages are accessed in answering queries of type Q1? b. How many pages are accessed in answering queries of type Q2? c. How many pages are accessed in answering queries of type Q3? d. How many pages are accessed in answering queries of type Q4? e. How many pages are accessed in answering queries of type Q5?
hash of attribute a hash of attribute b hash of attribute c hash of attribute a hash of attribute a hash of attribute b hash of attribute c hash of attribute a
PQ1 = 0.3
PQ2 = 0.2
PQ3 =0.2 PQ4 =0.1 PQ5 =0.2
f. What is the weighted average cost of answering a query on this relation?
Instructions:
Type your answer to this question into the file called q7.txt Submit via: submit q7
End of Question
Powered by TCPDF (www.tcpdf.org)
https://www.cse.unsw.edu.au/~cs9315/19T2/past-exams/14s2/Q07.html
1/1