in Databases
890 views
2 votes
2 votes
Consider a relation R with 2000 records and relation S with 500 records. Size of each record is 5 Byte and block size is 100 Byte, then minimum number of block access that are needed block nested loop join.

I think its answer should be 2525.
in Databases
890 views

4 Comments

2525 seems correct @shubhanshu
0
0
@shubhanshu :- Sorry for consussion. I got confused with nested loop join. 2525 is correct
0
0

@rahul sharma 5   isn't it same  " you are calculating block nested join but question says block nested loop join" ??? so correct answer is 2525.

0
0

2 Answers

5 votes
5 votes
2525 is the right answer.

Their were many wrong questions in this ace test.
0 votes
0 votes

watch this video for concept https://www.youtube.com/watch?v=rT4eI3p3tVk

Here, S is outer relation and R is inner relation. For a minimum number of block accesses, outer relation should be smaller.

Number of records in each block =  (Size of Block)/(Size of Record) = 100B/5B = 20

NR = Total Number of records in R = 2000

BR = Number of blocks in R = 2000/20 = 100

NS = 500

BS = 500/20 =25

Number of total block accesses = BS + BS*BR (for Block nested loop join) = 25 + 25*100 = 2525