Computer Science Engineering (CSE) Exam  >  Computer Science Engineering (CSE) Questions  >  A database table T1 has 2000 records and occu... Start Learning for Free
A database table T1 has 2000 records and occupies 80 disk blocks. Another table T2 has 400 records and occupies 20 disk blocks. These two tables have to be joined as per a specified join condition that needs-to be evaluated for every pair of records from these two tables. The memory buffer space available can hold exactly one block of records for T1 and one block of records for T2 simultaneously at any point in time. No index is available on either table.
Q. If Nested-loop join algorithm is employed to perform the join, with the most appropriate choice of table to be used in outer loop, the number of block accesses required for reading the data are 
  • a)
    800000
  • b)
    40080
  • c)
    32020
  • d)
    100
Correct answer is option 'C'. Can you explain this answer?
Verified Answer
A database table T1 has 2000 records and occupies 80 disk blocks. Anot...
Here condition given only 1 block of T1 and 1 block of T2 can present simultaneously inside the memory buffer space.

In Nested loop join every record of one table every block of second table is loaded.
So, If T1 is outer = 2000 x 20 + 80 = 40080 
If T2 is outer = 400 x 80 + 20 = 32020 
So we go with T2 as outer table = 32020
View all questions of this test
Most Upvoted Answer
A database table T1 has 2000 records and occupies 80 disk blocks. Anot...
Nested-Loop Join Algorithm

The Nested-Loop Join Algorithm is a joining technique used in database management systems where two tables are joined by comparing each row of one table with every row of the other table. It is a simple algorithm that can be used when no index is available on either table.

Steps Involved in Nested-Loop Join Algorithm

The following are the steps involved in the Nested-Loop Join Algorithm:

1. Read one block of records from Table T1 into memory buffer space.
2. For each record in the block, read one block of records from Table T2 into memory buffer space.
3. For each record in the block of Table T2, compare it with the record in the block of Table T1 that is currently in memory buffer space.
4. If the join condition is satisfied, output the joined record.
5. Repeat steps 2 to 4 until all the records in Table T2 have been compared with the records in the block of Table T1 that is currently in memory buffer space.
6. If all the records in Table T2 have been compared with the records in the block of Table T1 that is currently in memory buffer space, read the next block of records from Table T1 into memory buffer space and repeat steps 2 to 5 until all the records in Table T1 have been processed.

Answer

The most appropriate choice of table to be used in the outer loop is Table T1. This is because Table T1 has 2000 records, which is larger than the number of records in Table T2. By using Table T1 in the outer loop, we can reduce the number of times we read blocks of records from Table T1 into memory buffer space.

The number of block accesses required for reading the data is calculated as follows:

- Number of block accesses required for Table T1 = ceil(2000/1) = 2000
- Number of block accesses required for Table T2 = ceil(400/1) = 400
- Total number of block accesses = (2000 * 1) + (2000 * 400) = 32000

However, since the memory buffer space available can hold only one block of records for each table simultaneously, the number of block accesses required for Table T2 will be reduced to 20 (i.e., the number of blocks occupied by Table T2) when Table T1 is processed completely. Therefore, the total number of block accesses required is 2000 + 20 = 2020, which is closest to option C (32020).
Explore Courses for Computer Science Engineering (CSE) exam

Similar Computer Science Engineering (CSE) Doubts

Top Courses for Computer Science Engineering (CSE)

A database table T1 has 2000 records and occupies 80 disk blocks. Another table T2 has 400 records and occupies 20 disk blocks. These two tables have to be joined as per a specified join condition that needs-to be evaluated for every pair of records from these two tables. The memory buffer space available can hold exactly one block of records for T1 and one block of records for T2 simultaneously at any point in time. No index is available on either table.Q.If Nested-loop join algorithm is employed to perform the join, with the most appropriate choice of table to be used in outer loop, the number of block accesses required for reading the data area)800000b)40080c)32020d)100Correct answer is option 'C'. Can you explain this answer?
Question Description
A database table T1 has 2000 records and occupies 80 disk blocks. Another table T2 has 400 records and occupies 20 disk blocks. These two tables have to be joined as per a specified join condition that needs-to be evaluated for every pair of records from these two tables. The memory buffer space available can hold exactly one block of records for T1 and one block of records for T2 simultaneously at any point in time. No index is available on either table.Q.If Nested-loop join algorithm is employed to perform the join, with the most appropriate choice of table to be used in outer loop, the number of block accesses required for reading the data area)800000b)40080c)32020d)100Correct answer is option 'C'. Can you explain this answer? for Computer Science Engineering (CSE) 2024 is part of Computer Science Engineering (CSE) preparation. The Question and answers have been prepared according to the Computer Science Engineering (CSE) exam syllabus. Information about A database table T1 has 2000 records and occupies 80 disk blocks. Another table T2 has 400 records and occupies 20 disk blocks. These two tables have to be joined as per a specified join condition that needs-to be evaluated for every pair of records from these two tables. The memory buffer space available can hold exactly one block of records for T1 and one block of records for T2 simultaneously at any point in time. No index is available on either table.Q.If Nested-loop join algorithm is employed to perform the join, with the most appropriate choice of table to be used in outer loop, the number of block accesses required for reading the data area)800000b)40080c)32020d)100Correct answer is option 'C'. Can you explain this answer? covers all topics & solutions for Computer Science Engineering (CSE) 2024 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for A database table T1 has 2000 records and occupies 80 disk blocks. Another table T2 has 400 records and occupies 20 disk blocks. These two tables have to be joined as per a specified join condition that needs-to be evaluated for every pair of records from these two tables. The memory buffer space available can hold exactly one block of records for T1 and one block of records for T2 simultaneously at any point in time. No index is available on either table.Q.If Nested-loop join algorithm is employed to perform the join, with the most appropriate choice of table to be used in outer loop, the number of block accesses required for reading the data area)800000b)40080c)32020d)100Correct answer is option 'C'. Can you explain this answer?.
Solutions for A database table T1 has 2000 records and occupies 80 disk blocks. Another table T2 has 400 records and occupies 20 disk blocks. These two tables have to be joined as per a specified join condition that needs-to be evaluated for every pair of records from these two tables. The memory buffer space available can hold exactly one block of records for T1 and one block of records for T2 simultaneously at any point in time. No index is available on either table.Q.If Nested-loop join algorithm is employed to perform the join, with the most appropriate choice of table to be used in outer loop, the number of block accesses required for reading the data area)800000b)40080c)32020d)100Correct answer is option 'C'. Can you explain this answer? in English & in Hindi are available as part of our courses for Computer Science Engineering (CSE). Download more important topics, notes, lectures and mock test series for Computer Science Engineering (CSE) Exam by signing up for free.
Here you can find the meaning of A database table T1 has 2000 records and occupies 80 disk blocks. Another table T2 has 400 records and occupies 20 disk blocks. These two tables have to be joined as per a specified join condition that needs-to be evaluated for every pair of records from these two tables. The memory buffer space available can hold exactly one block of records for T1 and one block of records for T2 simultaneously at any point in time. No index is available on either table.Q.If Nested-loop join algorithm is employed to perform the join, with the most appropriate choice of table to be used in outer loop, the number of block accesses required for reading the data area)800000b)40080c)32020d)100Correct answer is option 'C'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of A database table T1 has 2000 records and occupies 80 disk blocks. Another table T2 has 400 records and occupies 20 disk blocks. These two tables have to be joined as per a specified join condition that needs-to be evaluated for every pair of records from these two tables. The memory buffer space available can hold exactly one block of records for T1 and one block of records for T2 simultaneously at any point in time. No index is available on either table.Q.If Nested-loop join algorithm is employed to perform the join, with the most appropriate choice of table to be used in outer loop, the number of block accesses required for reading the data area)800000b)40080c)32020d)100Correct answer is option 'C'. Can you explain this answer?, a detailed solution for A database table T1 has 2000 records and occupies 80 disk blocks. Another table T2 has 400 records and occupies 20 disk blocks. These two tables have to be joined as per a specified join condition that needs-to be evaluated for every pair of records from these two tables. The memory buffer space available can hold exactly one block of records for T1 and one block of records for T2 simultaneously at any point in time. No index is available on either table.Q.If Nested-loop join algorithm is employed to perform the join, with the most appropriate choice of table to be used in outer loop, the number of block accesses required for reading the data area)800000b)40080c)32020d)100Correct answer is option 'C'. Can you explain this answer? has been provided alongside types of A database table T1 has 2000 records and occupies 80 disk blocks. Another table T2 has 400 records and occupies 20 disk blocks. These two tables have to be joined as per a specified join condition that needs-to be evaluated for every pair of records from these two tables. The memory buffer space available can hold exactly one block of records for T1 and one block of records for T2 simultaneously at any point in time. No index is available on either table.Q.If Nested-loop join algorithm is employed to perform the join, with the most appropriate choice of table to be used in outer loop, the number of block accesses required for reading the data area)800000b)40080c)32020d)100Correct answer is option 'C'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice A database table T1 has 2000 records and occupies 80 disk blocks. Another table T2 has 400 records and occupies 20 disk blocks. These two tables have to be joined as per a specified join condition that needs-to be evaluated for every pair of records from these two tables. The memory buffer space available can hold exactly one block of records for T1 and one block of records for T2 simultaneously at any point in time. No index is available on either table.Q.If Nested-loop join algorithm is employed to perform the join, with the most appropriate choice of table to be used in outer loop, the number of block accesses required for reading the data area)800000b)40080c)32020d)100Correct answer is option 'C'. Can you explain this answer? tests, examples and also practice Computer Science Engineering (CSE) tests.
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

Explore Courses
Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev