10 likes | 162 Views
Index Structures. Consider a relation Employees ( eid , name, salary, age, did) stored as a heap file (unsorted) for which the only index is an unclustered index on a field called salary .
E N D
Index Structures • Consider a relation Employees (eid, name, salary, age, did) stored as a heap file (unsorted) for which the only index is an unclustered index on a field called salary. • 1. If you want to retrieve all records with salary > 50, is using the index always better than other alternatives? • 2. What could be a problem if the index is sparse? • 3. What will you recommend to change to make this index useful for both equality search (e.g., salary = 25) and range search ( e.g., 10 < salary < 30)? • 4. If you need to add one more index on a field called name, can both of them sparse? • 5. Can both of them clustered?