Database Reference
In-Depth Information
A model of column families: RowKey and cells
At this point, we've satisfied ourselves that each cell in a column family corresponds to a
column name and value at the CQL level. The mapping between CQL3 tables and lower-
level column families, so far, seems pretty straightforward. A table row's primary key value
is stored in the RowKey field, and each cell contains a name-value pair that represents the
value of the named column in the row.
We can make the relationship between the table representation and the column family rep-
resentation more accessible with a visualization of each:
We thus visualize the column family as a collection of RowKey values, with each RowKey
linked to a collection of cells containing a name and a value. Note that not every CQL3
column is represented by a cell in every RowKey field; only when a given column has a
value does it have a corresponding cell in the column family. This is consistent with our
mental model of CQL3 tables, developed in the Developing a mental model for Cassandra
section of Chapter 2 , The First Table .
As it turns out, the similarities between column families and CQL3 tables take us this far
and no further.
Search WWH ::




Custom Search