retagged by
610 views
9 votes
9 votes
Relation $L( p,q)$ is stored in $100$ blocks, with $50$ records per block (or tuples) of $L$ fitting in one block. Relation $K(m,n)$ is stored in $200$ blocks with $100$ records per block. When we compute $L \bowtie_{q=m} K$, we find that each tuple of $L$ joins with five tuples of $K$.  Therefore, the total number of blocks required in the result of join operation is: ______ blocks.
retagged by

1 Answer

Best answer
27 votes
27 votes

Relation L(p,q) is stored in 100 blocks, with 50 records ( or tuples ) of L fitting in one block .

L has total 100 blocks , each block have 50 tuples so total number of tuples in L = 100 * 50 = 5,000

50 tuples store in 1 block .

then 1 tuple store in (1/50) block , this is one single tuple size.

Similarly for K ,

K(m,n) is stored in 200 blocks with 100 records per block. 

total number of tuples in K = 200 * 100 = 2,0000 tuples.

100 tuple store in 1 block

1 tuple store in (1/100) block . Each tuple size = (1/100) block

Now, it says , in conditional join , each tuple of L joins with five tuples of K .

So total number of tuples in join is =  5000 * 5 = 25000 tuples

Conditional join return all columns of L and K , that is it returns ( p,q,m,n )

Total size of each tuple size of join = each tuple size of L + each tuple size of K 

=  (1/50) + (1/100)

= (3/100) of a block

There are total 25000 tuples in join .

Total number of blocks require

= total number of tuples * size of each tuple

= 25000 * (3/100 )

= 250 * 3

= 750 blocks

selected by
Answer:

Related questions

1 votes
1 votes
1 answer
2
Bikram asked Aug 26, 2017
399 views
Assume that a B-Tree is used as an index for a large database table which has six levels (including the root node). If a new key is inserted into this index, then the max...
2 votes
2 votes
1 answer
3
Bikram asked Aug 26, 2017
431 views
The above ER diagram depicts a book rental scheme.If this ER diagram is mapped to a relational model, to correctly depict this above scenario, the total number of relatio...
3 votes
3 votes
2 answers
4
Bikram asked Aug 26, 2017
409 views
$\sigma_{A=B \text{ and } B=C \text{ and } C=A} \bigg( \Pi_A (R) \times \Pi_B (R) \times \Pi_C (R) \bigg)$The number of rows returned by the above relational algebraic ex...