CSE Roadmap

Common tier · about 2 hours · 5 parts

Part 1 of 5 · 1 min read

Why this page comes first

In this module you will

  • Explain how a heap file stores records, and why finding one requires scanning.
  • Explain how a sorted file stores records, and what it buys over a heap file.
  • Explain the real cost a sorted file pays when a new record needs to be inserted.
  • Connect file organization to why an index, covered in Level 5, is usually a separate structure layered on top.

A table's rows have to be arranged somehow inside the file holding them. This page covers the two basic arrangements, and the direct trade-off between them: fast inserts versus fast ordered reads.