Subjects databases

Blocks Read Flight 56A471

Step-by-step solutions with LaTeX - clean, fast, and student-friendly.

Use the AI math solver

1. The problem asks to determine which blocks are read by the query: $$\text{SELECT Time FROM FlightTable WHERE Flight \leq 167;}$$ 2. The table is sorted on the Airport column, and the index on Airport is sparse. However, the query filters on the Flight column, which is not the indexed column. 3. Since the index is on Airport and the query filters on Flight, the database cannot use the sparse index on Airport to directly filter by Flight. 4. Therefore, the query will likely perform a full table scan or read all blocks containing Flight values less than or equal to 167. 5. From the provided flight data, the Flight values less than or equal to 167 are: - 151 (Lufthansa, ABQ) - 1038 (Delta Air Lines, ALF) [excluded since 1038 > 167] - 588 (British Airways, BLR) [excluded] - 834 (Aer Lingus, DTW) [excluded] - 752 (British Airways, HAV) [excluded] - 1129 (Air China, JNB) [excluded] - 659 (Air India, MAA) [excluded] - 393 (Aer Lingus, MAD) [excluded] - 900 (Air China, NKG) [excluded] - 390 (American Airlines, ONT) [excluded] - 1157 (Lufthansa, PMO) [excluded] - 650 (Southwest Airlines, QRO) [excluded] - 368 (Southwest Airlines, SJC) [excluded] - 973 (British Airways, SVQ) [excluded] - 789 (Lufthansa, THR) [excluded] - 822 (Aer Lingus, VAA) [excluded] - 913 (United Airlines, WGA) [excluded] - 167 (Air India, ZCL) 6. The flights with Flight values \(\leq 167\) are 151 and 167. 7. Since the table is sorted by Airport, and the index is sparse on Airport, the blocks containing these Flight values will be read. 8. Hence, the blocks containing Flight 151 (Airport ABQ) and Flight 167 (Airport ZCL) will be read. Final answer: The blocks containing Flight 151 and Flight 167 are read by the query.