Choose the correct statements:
Which of the following is not a file operation?
Index sequential file is made of all of these expect
Which of the following is correct?
Most database systems use indexes built on some form of a B+ tree due to its many advantages, in particular its support for range queries. Leaf nodes are linked together in B+ trees hence range queries are faster.
B+ trees are preferred to binary trees in databases because
Disk access is slow and B+ tree provide search in less number of disk hits. This is primarily because unlike binary search trees, B+trees have very high fanout (typically on the order of 100 or more), which reduce the number of I/O operations required to find an element in the tree.
AB+ tree index is to be built on the Name attribute of the relation STUDENT. Assume that all student names are of length 8 bytes, disk blocks are of size 512 bytes, and index pointers are of size 4 bytes. Given this scenario, what would be the best choice of the degree (i.e. the number of pointers per node) of the B+ tree?
Let n be the degree
Given, k, key size (length of the name = 8 byte attribute of student)
Disk block size, B = 512 bytes
Index pointer size, b = 4 bytes
Degree of B+ tree can be calculated if we know the maximum number of key a internal node can have the formula for that is
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
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
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, instead of Nested-loop join, Block nested-loop join is used, again with the most appropriate choice of table in the outer loop, the reduction in number of block accesses required for reading the data will be
In Nested block loop join, in place of for every record of table 1, fetch every block of table 2, we go for every block of table 1, fetch every block of table 2.
So, If T1 is outer = 80 x 20 + 80 = 1680
If T2 is outer = 80 x 20 + 20 = 1620
So we go with T2 as outer table = 1620
Reduction in number of block access
= 32020-1620 = 30400
A clustering index is defined on the fields which are of type
If records of a file are physically ordered on a non-key field which doesn't have a distinct value for each record that field is called the clustering field.
Consider a file of 16384 records. Each record is 32 bytes long and its key field is of size 6 bytes. The file is ordered on a non-key field, and the file organization is unspanned. The file is stored in a file system with block size 1024 bytes, and the size of a block pointer is 10 bytes. If the secondary index is built on the key field of the file, and a multilevel index scheme is used to store the secondary index, the number of first- level and second-level blocks in the multilevel index are respectively
Total number of records = 16384
Record size = 32 B
lock size = 1024 B
Number of records inside block
In index block number of entries
So, at 1st level index block
at 2nd level index block
Use Code STAYHOME200 and get INR 200 additional OFF
|
Use Coupon Code |
![]() |
|
![]() |
|
![]() |
|
![]() |
|
|
|
|
|
|