Question
[ Selection ] (30) Consider a schema of an Employee relation, with each attribute defined along with their data type: Employee (eid: integer, ssn: integer,
[Selection] (30) Consider a schema of an Employee relation, with each attribute defined along with their data type: Employee (eid: integer, ssn: integer, ename: string, age: integer, salary: string)
The following is known:
eid is the primary key, and ssn is a candidate key.
Tuples in Employee are stored as fixed length records. There is no storage overhead for record head or block head (or simply consider their sizes to be 0).
All integer fields take 4 bytes, and all string fields take 8 bytes.
A block has a capacity of 14KB (14000 bytes).
It takes 500 blocks to store an instance r of Employee.
The table stores information of employees with eid in the range [1, 500000].
For each of the following selection query, estimate the number of blocks to be retrieved (in the worst case).
a). There is no index available; query: Employee.salary = 2000(r)
b). There is a B+ tree index on search key Employee.eid with value range 1 to 70000, and with height 4; query: Employee.eid=50,000(r)
c). There is a B+ tree primary index on search key Employee.ssn with height 5; query: Employee.ssn> 50000(r)
d). There is a secondary B+ tree index on search key Employee.ssn with height 5;
query: Employee.ssn < 12345(r)
e). There is a secondary B+ tree index on search key Employee.salary with height 4;
query: Employee.salary<45000(r)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started