asg1_suggested_answers - n c =2500, b c =500 n i =3000, b i...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
CS4482/6492 Advanced Database Systems Assignment 1 1. a) The final tree: b) The final tree: c) The final tree: Possible observations: o New search-key values are always inserted in the same leftmost leaf node. When this leaf node gets filled, it is split into two. The right node is untouched and the insertions always take place on the left node. o Except the leftmost leaf node, the occupancy of all the other leaf nodes is half. o The height of the B + -tree is greater than the one constructed in part a). o The occupancy of nodes is smaller than the one constructed in part a). 9 9 10 8 6 7 2 4 6 8 12 12 13 13 9 10 2 4 12 8 12 10 10 9 8 7 8 12 12 13 13 6 2 4 6 7 9
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CS4482/6492 Advanced Database Systems Assignment 1 2. a) The final structure: b) The final structure: 8 41 17 2 13 28 2 3 2 3 30 3 3 43 27 3 51 7 71 63 3 8 17 2 28 63 30 1 3 3 43 27 2 51
Background image of page 2
CS4482/6492 Advanced Database Systems Assignment 1 3. One possible evaluation plan (not the cheapest):
Background image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: n c =2500, b c =500 n i =3000, b i =750 n t =30000, b t =3000 M =7 customer transaction item ( date 20110901) o 2-level clustered B+-tree on date o cost=2+3000*(10/30)=1002 a o output size=10000 tuples=1000 blocks o 2-level clustered B+-tree on custID o cost=10000*3=30000 b o output size=10000 tuples (the join attribute is a key for customer ) pipeline ( age 30 sex =’F’) o output size=10000*(30-18)/(70-18)*0.5 o =1154 tuples pipeline pipeline o 3-level clustered B+-tree on itemID o cost=1154*4=4616 c o output size=1154 tuples (the join attribute is a key for item ) ( name , itemName , price ) o output size=1154 tuples=116 d blocks materialize merge sort to eliminate duplicates o initial number of runs= 116/7 =17 o number of merge passes=2 o cost=116*(2*2+1)=580 e Total cost= a + b + c + d + e =36314 pipeline...
View Full Document

This note was uploaded on 01/11/2012 for the course CS CS4482 taught by Professor Drlee during the Winter '11 term at City University of Hong Kong.

Page1 / 3

asg1_suggested_answers - n c =2500, b c =500 n i =3000, b i...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online