Questions: Physical Storage: Pages, Records, and Heap Files

5 questions to test your understanding

Score: 0 / 5
Question 1 Multiple Choice

A table has 500,000 rows, each 200 bytes. Pages are 8KB. A query needs exactly one row. How many pages must the database read in the worst case (assuming a heap file with no index)?

A1 page — the database reads only the page containing the needed row
B500 pages — one page per thousand rows
CApproximately 12,500 pages — the entire heap file must be scanned
D200 pages — one page per byte in the row
Question 2 Multiple Choice

When a record is moved within a page during compaction, the database must update every external reference (such as index entries) pointing to that record's location.

ATrue — every reference stores the physical byte offset, so any move requires updating all references
BFalse — the slot array provides indirection so only the slot pointer needs updating, not external references
CTrue — slot arrays only help within a page, not for cross-page references
DFalse — records can never be moved once written; compaction is not possible
Question 3 True / False

The database reads a minimum of one full page from disk even if the query only needs a single column from a single row.

TTrue
FFalse
Question 4 True / False

Variable-length columns (VARCHAR, TEXT) are stored at the beginning of a record so the database can quickly locate them.

TTrue
FFalse
Question 5 Short Answer

Why is the page the fundamental unit of disk I/O in a database system, and what consequence does this have for query performance?

Think about your answer, then reveal below.