I need to understand how these values are being derived. Can anyone explain to m
ID: 659671 • Letter: I
Question
I need to understand how these values are being derived. Can anyone explain to me what this table would actually look like, and why A = 1000, B = 20, C = 10, D = 10 and E = 1?
Consider a table storing temperature readings taken by sensors: Temps(sensorID, time, temp) Assume the pair of attributes [sensorID,time] is a key. Consider the following query: select * from temps where sensorID = 'sensor541' and time = '05:11:02' A - No index is present on any attribute of temp B - An index is present on attribute sensorID only D - seperate indexes are present on attributes sensorID and time E - A multi - attribute index is present on (sensorID, time) Suppose table Temps has 50 unique sensorlDs and each sensorlD has exactly 20 readings. Furthermore there are exactly 10 readings for every unique time in Temps. For each scenario A-E, determine the maximum number of tuples that might be accessed to answer the query, assuming one "best" index is used whenever possible. (Don't count the number of index accesses.) Which of the following combinations of values is correct?Explanation / Answer
Combining point (B), (C), (E) = the query written to retrieve value from database.{The query takes time,Sensor Id } as key
An index present on attribute sensor Id gives a unique way to search for the best index.
To answer for the "best Index" the maximum number of tuples to be searched is calculated as:-
For one unique Sensor Id seached in the table there are 20 readings associated.
So we have to traverse through all 20 readings of that particular sensor id, Also for each reading ->10 readings for unique time is present giving a total of (20*10) searchings for one best index associated with a unique sensor Id.
The correct option is:- B=20 C=10, E=1