A column family is a
database object that contains columns of related data. It is a
tuple
In mathematics, a tuple is a finite sequence or ''ordered list'' of numbers or, more generally, mathematical objects, which are called the ''elements'' of the tuple. An -tuple is a tuple of elements, where is a non-negative integer. There is o ...
(pair) that consists of a
key–value pair, where the key is mapped to a value that is a set of columns. In analogy with relational databases, a column family is as a "table", each key-value pair being a "row". Each column is a
tuple
In mathematics, a tuple is a finite sequence or ''ordered list'' of numbers or, more generally, mathematical objects, which are called the ''elements'' of the tuple. An -tuple is a tuple of elements, where is a non-negative integer. There is o ...
(
triplet) consisting of a column name, a value, and a
timestamp
A timestamp is a sequence of characters or encoded information identifying when a certain event occurred, usually giving date and time of day, sometimes accurate to a small fraction of a second. Timestamps do not have to be based on some absolu ...
. In a
relational database table
In a database, a table is a collection of related data organized in table format; consisting of columns and rows.
In relational databases, and flat file databases, a ''table'' is a set of data elements (values) using a model of vertical colum ...
, this data would be grouped together within a table with other non-related data.
Two types of column families exist:
*
Standard column family: contains only columns
*
Super column family: contains a map of
super columns
See also
*
Keyspace (NoSQL)
References
{{reflist
External links
The Apache Cassandra data model Distributed data stores
NoSQL