Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

[ 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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Information And Database Systems 12th Asian Conference ACIIDS 2020 Phuket Thailand March 23 26 2020 Proceedings

Authors: Pawel Sitek ,Marcin Pietranik ,Marek Krotkiewicz ,Chutimet Srinilta

1st Edition

9811533792, 978-9811533792

More Books

Students also viewed these Databases questions

Question

What is the purpose of recruitment and selection?

Answered: 1 week ago