Chapter 2. Catalog
The previous chapter showed how records are stored inside a page. One question remains. When you open a page, the record is just a lump of bytes. Nothing says "these ten bytes are the customer name, and the next four bytes are the gender." How, then, does the database interpret the bytes in a page?
The database manages information about the data, that is, metadata, separately from the data itself. It records which tables exist, which columns each table consists of, what type each column has and how many bytes it takes, and where the table's data is stored. Without this information, a page is just a byte array whose meaning cannot be recovered even after reading it in. The place where the database keeps this metadata is the catalog.