The content of a relation R is as follows: d d d d .... d a a a a ... a c c c c .... c b b b b ....b ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^ 100 tuples 100 tuples 100 tuples 100 tuples R has a ordered clustering index file on its tuples: (a b c d) The index file contains the record location of the first tuple with that given value |
We use the ordered index to access all tuples of relation R in a sorted manner as follows:
Read index file to get the location of the tuple with the next smallest value Access all (clustering) tuples with the next smallest value |
Questions:
|
R = R(A, B, C) // R has attributes A, B, C B(R) = 1000 block T(R) = 10000 tuples V(R, A) = 100 // We assume that # tuples with // attribute value A = a is equal to: // 10000/100 = 100 for any value a S = S(A, D, E) // S has attributes A, D, E B(S) = 200 block T(S) = 4000 tuples V(S, A) = 100 // We assume that # tuples with // attribute value A = a is equal to: // 4000/100 = 40 for any value a |
|
R = R(A, B, C) // R has attributes A, B, C B(R) = 1000 block T(R) = 10000 tuples V(R, A) = 100 // We assume that # tuples with // attribute value A = a is equal to: // 10000/100 = 100 for any value a S = S(A, D, E) // S has attributes A, D, E B(S) = 200 block T(S) = 4000 tuples V(S, A) = 100 // We assume that # tuples with // attribute value A = a is equal to: // 4000/100 = 40 for any value a |
|