532 views
0 votes
0 votes
Consider three relations $R_1(\underline{X},Y,Z), R_2(\underline{M},N,P),$ and $R_3(\underline{N,X})$. The primary keys of the relations are underlined. The relations have $100,30,$ and $400$ tuples, respectively. The space requirements for different attributes are: $X= 30$ bytes,$Y= 10$ bytes, $Z= 10$ bytes, $M= 20$ bytes, $N= 20$ bytes,and $P= 10$ bytes. Let $V(A,R)$ signify the variety of values that attribute $A$ may have in the relation $R$. Let $V(N,R_2) = 15$ and $V(N,R_3) = 300$.Assume that the distribution of values is uniform.

(a) If $R_1,R_2,$ and $R_3$ are to be joined, find the order of join for the minimum cost. The cost of a join is defined as the total space required by the intermediate relations. Justify your answer.

(b) Calculate the minimum number of disk accesses (including both reading the relations and writing the results) required to join $R_1$ and $R_3$ using block-oriented loop algorithm. Assume that (i) 10 tuples occupy a block and (ii) the smaller of the two relations can be totally accommodated in main memory during execution of the join.

For, (a), Order could be anything and min. cost =$100*30*400*$total size of all the attributes.

Please log in or register to answer this question.

Related questions

1 votes
1 votes
1 answer
3
ankitgupta.1729 asked Feb 21, 2019
1,265 views
Let, $a_{n} \;=\; \left ( 1-\frac{1}{\sqrt{2}} \right ) ... \left ( 1- \frac{1}{\sqrt{n+1}} \right )$ , $n \geq 1$. Then $\lim_{n\rightarrow \infty } a_{n}$(A) equals $1$...