Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

This question is related to Database Management please,don\'t answer with handwr

ID: 3590431 • Letter: T

Question

This question is related to Database Management

please,don't answer with handwriting .

Thank

Cotisider the following Emplovee relatio11: EMPLOYEE Ssn Sex Salary B Smith 123456789 1965-01-09 731 Fondren, Houston, TX M 30000 Bdate Address Fname Minit Lname John Franklin TWong 333445555 1955-12-08 638 Voss, Houston, TXM40000 Alicia ! Zelaya | 999887777 | 1968-01-19 | 3321 Castle, Spring, TX- 25000 Jennifer SWallace 987654321 1941-06-20 291 ery, Bellaire, TXF 43000 Welace 98784321-20 Ramesh K Narayan 666884444 1962-09-15 975 Fire Oak, Humble, TX M 38000 Joyce AEnglish 453453453 1972-07-31 5631 Rice, Hpuston, TX F25000 James Erg 888665555 1937-11-10 450 Stone, Houston, TXM 55000 Construct a bitmap index on the attribute salary, dividing salary values into 2 ranges: below 40000, 40000 to below 60000.

Explanation / Answer

Before directly dividing salary values into 2 ranges and creating bitmap index,let's see whaat is a bit map

BITMAP:

Basically a bit map is used for an attribute which consists of non unique column values.

A Bitmap is varied from b-tree by the cardinality .

Cardinality:

cardinality is calculated as c = (number of distinct values) / (total number of records) .

Generally a bitmap is used only for the attributes which are having lowest cardinality (less than 1).

Dividing salary values into 2 ranges:

command used to retreive salary values below 40000 is :

select *from EMPLOYEE where salary<40000 order by salary;

the commmand above displays the entries of the table employee who are all having salary less than 40000

Now,let's retreive the entries of those who are having the salary ranging from 40000 to 60000

select *from EMPLOYEE where salary>=40000 and salary<60000 order by salary;

Constructing bit map index on attribute salary:

create index idx1 on EMPLOYEE(salary);

the above command creates bit map index for the attribute salary .

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote