Indexing

Question 1
A clustering index is defined on the fields which are of type
A
non-key and ordering
B
non-key and non-ordering
C
key and ordering
D
key and non-ordering
       Database-Management-System       Indexing       Gate-2008
Question 1 Explanation: 
Create index files, fields could be non-key attributes and which are in ordered form so as to form clusters easily.
Question 2
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 multi-level index scheme is used to store the secondary index, the number of first-level and second-level blocks in the multi-level index are respectively
A
8 and 0
B
128 and 6
C
256 and 4
D
512 and 5
       Database-Management-System       Indexing       Gate-2008
Question 2 Explanation: 
Total no. of records in a file = 16384
Record size = 32 bytes
Key size = 6 bytes
Block pointer size = 10 bytes
Block size of file system = 1024 bytes
Record (or) index entry size = 10+6 = 16 bytes
In first level no. of blocks =No. of records in a file/Block size=16384 * 16/1024=256
In second level, it have = 256*16 entries
In second level, no. of blocks =No. of entries/Block size =256*16/1024=4
Question 3
 
A
Age
B
Name
C
Occupation
D
Category
       Database-Management-System       Indexing       Gate-1998
Question 3 Explanation: 
Indexing will be on occupation field because occupation field lexigraphically sorted will give the sequence 1, 3, 2, 5, 4.
Question 4
For secondary key processing which of the following file organizations is preferred? Give a one line justification:
A
Indexed sequential file organization.
B
Two-way linked list.
C
Inverted file organization.
D
Sequential file organization.
       Database-Management-System       Indexing       Gate-1989
Question 4 Explanation: 
Inverted file organization, because of reasons are as follows:
→ An index for each secondary key.
→ An index entry for each distinct value of the secondary key.
→ Exhibits better enquiry performance.
There are 4 questions to complete.
PHP Code Snippets Powered By : XYZScripts.com