NoSQL · Data models beyond tables
How do wide-column stores organise data?
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.
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;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.
Follow-ups you should expect
Interviewers use these to check whether the first answer was understanding or memorisation.
- 1Why is the partition key so important in Cassandra?
- 2How do you support a second query pattern?
- 3What is a clustering column?
- 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.