Part 2 of 5 · 2 min read
Wide columns instead of fixed columns
Each row can hold a different, sparse set of columns, grouped into named families, rather than every row sharing one fixed set of columns.
Think of a relational table as a printed form, every copy with the exact same numbered boxes. Compare that to a folder for each customer, where anyone can staple in a new, differently labeled note at any time. Two folders can hold completely different notes.
In plain words: a relational table fixes its columns in advance; every row has a value, or a null, for every declared column. A column-family store instead lets each row hold a different, sparse set of columns. Columns are grouped into named column families for storage and access purposes, but within a family, a row can have any columns at all, added at write time with no schema declaring them in advance. A row that never writes a particular column simply does not store anything for it, not even a null.
A worked example. The bookstore logs an event trail per order: order_placed, payment_captured, shipped. Order 9001's row might have columns named by timestamp, one per event it actually experienced. Order 9002, still unshipped, simply has fewer columns in that same family. Neither row needs to declare in advance which event columns it will eventually have.
The key lines. No SQL; column-family stores are typically accessed through their own API or a SQL-like language specific to the store, not standard SQL.
row: order_9001
family "events":
"2026-01-03T10:00:00" -> "order_placed"
"2026-01-03T10:05:00" -> "payment_captured"
"2026-01-05T09:00:00" -> "shipped"
row: order_9002
family "events":
"2026-01-04T11:00:00" -> "order_placed"
Wide-column layout, column family
A wide-column layout lets each row hold a different, sparse set of columns, with no fixed schema declaring every column in advance. A column family is a named grouping of related columns, stored together, within which individual rows can still vary in which specific columns they hold.
Example: order 9001's events family holding three timestamped columns, while order 9002's holds only one, with neither row declaring the others as missing, is the wide-column layout in action.