What is the type of index that is automatically built on EMP_CODE on the EMPLOYE
ID: 3722512 • Letter: W
Question
What is the type of index that is automatically built on EMP_CODE on the EMPLOYEE table? ___________________________________.
We want to improve the speed of a query that is run to show who is assigned to each vehicle. On which table would we build the index? _______________________ and on which attribute on that table? ______________________________.
Table Name: FLEET Table Name: EMPLOYEE EMP CODE VEH ID L NAME Davolio Grubb Leverling Penn Buchanan Smith King Callaharn Dodsworth Klein Johnston Phillips Basil Sunn Barker VEH ID VEH TYPE 10 20 30 40 50 Truck-FLOATER 2 Truck Truck Truck Truck Van Line ServiceTruck 4 6 4 70 80 100 110 120 130 140 150 4Explanation / Answer
1. Primary Index(Implicit Index as it is automatically created). Since the attribute EMP_CODE is unique and it is the primary key.
2. EMPLOYEE table. Since it also contains the driver name for the vehicle. Else , if we build the index on FLEET Table , for a vehicle, to get the driver name, you need to do a join(cross product) which takes time.
3. VEH_ID . Sincee based on this attribute , we can identify the vehicle from the veh_id
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.