Assignment 2 QP DBMS
Assignment 2 QP DBMS
Assignment II
Programme / B.Tech. & Information Technology Semester IV
Branch
Course Code &
60 IT 402– Database Management Systems Date of Issue 29.04.2024
Name
Date of
Maximum Marks 50 08.05.2024
Submission
1. Sample Data: Let's assume we have the following sample data for employee
records:
Employee ID Name Department Salary
101 John Doe Sales $50,000
102 Jane Smith Marketing $45,000
103 Mike Johnson IT $55,000
104 Sarah Lee HR $40,000
105 David Brown Finance $60,000
106 Emily Davis Sales $48,000
107 Alex Wilson Marketing $52,000
108 Olivia Clark IT $58,000
(i) Design dense and sparse indexes for the above database managing
employee records.
(ii)Discuss how each index structure facilitates efficient retrieval based on
different search criteria like employee ID and salary range, and then illustrate
the insertion and deletion operations for each index type.
Dense Index Design:
1. Employee ID Dense Index:
The dense index will consist of a sorted array or list of employee
IDs along with pointers to the corresponding records. Ap CO3 20
This index facilitates direct access to employee records
based on their unique IDs.
Each entry in the dense index corresponds to a unique employee
ID.
2. Salary Range Dense Index:
Similarly, another dense index will be created for salary ranges.
Each entry in this index will represent a salary range (e.g.,
$30,000 -
$40,000) along with pointers to records falling within that range.
This index allows efficient retrieval of employee records based
on salary ranges.
2. Consider a B-Tree of order m=4. Illustrate the process of inserting the following
keys into the B-Tree: 10, 20, 5, 15, 25, 30, 3, 9, 8. Show the resulting B-Tree
Ap CO3 10
after each insertion, including any necessary splitting or merging operations.
Ap CO4 20