NoSQL · Data models beyond tables

How do wide-column stores organise data?

Mediumwide-columncassandrapartitioningUpdated Oct 2026
Quiz this track

Short answer

Wide-column stores group rows by partition key and sort them by clustering columns, storing sparse column families on disk. Queries must respect that key order, which makes the model query-first rather than entity-first.

A row is identified by a partition key plus optional clustering columns. All rows with the same partition key live together on the same replicas and are sorted by the clustering columns. Columns can be sparse, meaning different rows need not share the same set of fields.

sql
CREATE TABLE events_by_user (
  user_id uuid,
  event_time timestamp,
  event_type text,
  payload text,
  PRIMARY KEY ((user_id), event_time)
) WITH CLUSTERING ORDER BY (event_time DESC);

SELECT event_type, payload
FROM events_by_user
WHERE user_id = 7f1c2a3e
  AND event_time > '2026-10-01'
LIMIT 50;
The partition key is user_id and the clustering column is event_time, so one user's events are read in time order from one partition.

What this enables and constrains

  • Very high write throughput because writes are append-oriented and partition-local
  • Efficient range scans within a partition by clustering key
  • No joins and no arbitrary WHERE clauses without a suitable index
  • A separate table or materialised view is often needed for each query pattern

The model rewards duplication. If the product needs events by user and events by type, you may write the same event to two tables. That is normal, because each table is a purpose-built query structure rather than a normalised source of truth.

Avoid partitions that grow without bound, such as partitioning only by date on a busy system. A partition has practical size and row-count limits, and an oversized partition hurts repair and compaction.

Follow-ups you should expect

Interviewers use these to check whether the first answer was understanding or memorisation.

  1. 1Why is the partition key so important in Cassandra?
  2. 2How do you support a second query pattern?
  3. 3What is a clustering column?
  4. 4Why are joins not supported?

Say it in the interview

A wide-column store lays rows out by partition key and then sorts them by clustering columns, so one partition read can return an ordered range efficiently. I design the table around a query, not around a normalised entity, and I expect to duplicate data for additional query patterns. Writes are fast because they are partition-local and append-oriented. The main constraints are no joins and no arbitrary filters, plus keeping partitions bounded in size.

Use this as a model, not a script. Saying it in your own words is what makes it survive follow-up pressure.

Related questions

Reading is step one

Now say it out loud.

Understanding an answer and delivering it under pressure are different skills. Rehearse this topic in a live NoSQL mock interview and get scored feedback on depth, clarity and confidence.