Advanced Topic 42 of 51 Databases
Column-Family Stores
Wide-column stores optimized for large writes.
How it works
Column-family or wide-column stores, such as Cassandra, HBase and Bigtable, organize data into rows identified by a key, with columns grouped into families, and rows can have different columns. Data is partitioned by row key across nodes, and within a partition it is sorted by clustering columns, making range scans within a partition efficient. They are built on LSM trees for high write throughput and scale linearly across many machines.
Step-by-step walkthrough
- Rows are identified by a row key.
- Columns are grouped into families stored together.
- Each row can have different columns.
- Cells carry timestamps for versions.
- Writes are append-only and fast, so it suits huge write volumes, as in Cassandra.
Where it is used
Time-series data, messaging, sensor logs, activity feeds and very large write-heavy workloads use wide-column stores.
Common pitfall
Tables must be designed around specific queries, and ad hoc queries or joins are not supported. Poor partition keys create hot or huge partitions. Deletes leave tombstones that affect reads. Consistency is tunable and eventual by default, so understand quorum settings. Denormalize and duplicate data per query pattern.
Where it fits in the course
Column-Family Stores is topic 42 of 51 in Databases, rated Advanced. It follows Key-Value Stores. The next topic is Graph Databases.
Practice and explore
- Open the interactive lesson, with a mini quiz.
- Take the Databases quiz.
How to study this topic
- Read the explanation above and restate the definition in your own words.
- Open the interactive lesson and answer its mini quiz.
- Read the common pitfall, then write a short example that avoids it.
- Check your understanding in the Databases quiz, and revisit the topic if you miss a question.
Frequently asked questions
What is Column-Family Stores?
Where do people use Column-Family Stores?
What is the most common mistake with Column-Family Stores?
What should I learn before this topic?
How can I practice it?
Is Column-Family Stores hard to learn?
How long does it take to learn Column-Family Stores?
Which topics are related to Column-Family Stores?
What should I study after Column-Family Stores?
Related topics
- Key-Value Stores (Databases)
- Graph Databases (Databases)
- Document Stores (Databases)
- CAP Theorem (Databases)
- SHA Family (Security & Cryptography)