Part 2 of 5 · 1 min read
Row-oriented storage
All of one record's values stored together, physically adjacent on disk.
Think of an index card system for customers. Each card holds everything about one customer: name, address, every detail, all on one card.
In plain words: row-oriented storage keeps all of one row's column values physically adjacent on disk. Reading one whole row, such as for a single order's full details, is efficient, since everything needed sits in one place. Reading just one column across many rows, such as "every order's placed_on date," requires touching every row's full data anyway.
A worked example. Fetching one specific order's complete details, for a receipt, reads efficiently from row-oriented storage, since the whole row is contiguous.
The key lines.
SELECT * FROM orders WHERE order_id = 9001;
-- efficient in row-oriented storage: the whole row is stored together
Row-oriented storage
Row-oriented storage keeps each row's full set of column values physically adjacent, efficient for reading or writing whole records at a time.
Example: fetching one order's complete row for a receipt is a natural fit for row-oriented storage.