0% found this document useful (0 votes)
104 views1 page

Database Design and Applications (SSZ G518) 2 Semester 2017-18 Homework Topic: Indexing

This document contains 3 questions related to indexing database records stored on disk. The first question asks the student to design a multilevel index for a data file containing 270,000 records of fixed length stored on disk blocks of 512 bytes, and to calculate indexing statistics like fan-out, number of levels, blocks required, and block accesses needed for different indexing schemes. The second question asks the student to design the optimal number of pointers per internal node for a B+ tree index with a disk block size of 512 bytes and primary key length of 7 bytes. The third question asks the student to construct a B+ tree with a fan-out of 3 for a given set of key values, showing the

Uploaded by

Vishy Anand
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
104 views1 page

Database Design and Applications (SSZ G518) 2 Semester 2017-18 Homework Topic: Indexing

This document contains 3 questions related to indexing database records stored on disk. The first question asks the student to design a multilevel index for a data file containing 270,000 records of fixed length stored on disk blocks of 512 bytes, and to calculate indexing statistics like fan-out, number of levels, blocks required, and block accesses needed for different indexing schemes. The second question asks the student to design the optimal number of pointers per internal node for a B+ tree index with a disk block size of 512 bytes and primary key length of 7 bytes. The third question asks the student to construct a B+ tree with a fan-out of 3 for a given set of key values, showing the

Uploaded by

Vishy Anand
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Database Design and Applications(SSZ G518)

2nd Semester 2017-18

Homework

Topic: Indexing
Date: 12-03-2018

Q1: Assume that we have an ordered file with 2,70,000 records stored on disk. The disk block size is
512 Bytes. The record length is fixed and it is 45 Bytes. The Key field (PK) length is 5 Bytes and block
pointer takes 8 Bytes. Consider unspanned record organization.

Design a multilevel index on primary key. Now, answer the following.


What is the blocking factor for data file.
What is the fan-out of the multilevel index.
How many levels are there in the indexing structure, in total.
How many blocks are there in each level (indexing).
How many block accesses are needed to access a record?
How many records are there in top level index block.
How many blocks are needed to store data.
How many block accesses are needed to access a record with just one level of indexing?
How many block accesses are needed to access a record, if no indexing done?

Q2: We need to design a B+ tree indexing for a relation, on the PK of the relation. The PK attribute
is of 7 bytes length. The Disk block size is 512 Bytes. If the tree-pointer takes 4 bytes, for the
above situation, design the best possible number of pointers per node(internal) of the above B+
tree. Each internal node is a disk block which contains search key values and pointers to subtrees.

Q3. Construct a B+ tree with fan-out (order- P) equal to 3 for the following set of key values.
72, 28, 34, 50, 98, 15, 63, 48, 4. Assume that the tree is initially empty and the values are added in the
order given. For the B+ tree Pleaf = 2.
Show the tree after each insertion.

Prof.R Gururaj
Course IC for SSZG518

You might also like