I am getting trouble being aware of what this is asking:

Given a non-dense index on Attribute SALARY of Table EMPLOYEE, is it feasible to reply to query

SELECT COUNT(*) FROM EMPLOYEE WHERE SALARY < 10,000

without carrying out a linear scan from the file? Otherwise, how will you revise the non-dense index make it possible for a far more efficient process?

I realize exactly what the totally searching for however i don't really know very well what the qualities of the non-dense index are that report to carrying out queries. Since you will find values for salary that Employees will not always have, then this means that index is non-dense?

If that's the case, I do not observe how I am permitted to alter the index to create the query more effective.

A non-dense index has:

  • One entry for every block
  • One entry for every different value

A dense index has:

  • One entry in index for every record

A non-dense index on Salary consists of an entry for every different salary value, although not each record. Therefore the index doesn't contain enough information to do the COUNT(*) without reverting to some linear scan from the computer file.

When the index on Salary was dense then you may perform

SELECT COUNT(*) FROM EMPLOYEE WHERE SALARY < 10,000

without a linear scan from the file.