Challenges and Strategies for Unclustered Indexes in Employee Data Management
This text explores the implications of using an unclustered index on the salary field within a heap file storing employee records. It addresses the efficiency of this approach when retrieving records with salaries greater than 50, the issues caused by a sparse index, and recommendations for enhancing the index for both equality and range searches. Additionally, it examines the feasibility of having multiple sparse indexes on different fields and discusses the clustering capabilities of these indexes, providing insights into optimal data retrieval strategies.
Challenges and Strategies for Unclustered Indexes in Employee Data Management
E N D
Presentation Transcript
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?