Column family
Encyclopedia
A column family is a NoSQL object that contains columns of related data. It is a tuple
(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
(triplet
) consisting of a column name, a value, and a timestamp
. In a relational
database table, this data would be grouped together within a table with other non-related data.
Two types of column families exist:
Tuple
In mathematics and computer science, a tuple is an ordered list of elements. In set theory, an n-tuple is a sequence of n elements, where n is a positive integer. There is also one 0-tuple, an empty sequence. An n-tuple is defined inductively using the construction of an ordered pair...
(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
Tuple
In mathematics and computer science, a tuple is an ordered list of elements. In set theory, an n-tuple is a sequence of n elements, where n is a positive integer. There is also one 0-tuple, an empty sequence. An n-tuple is defined inductively using the construction of an ordered pair...
(triplet
Triplet
-Science:* A series of three nucleotide bases that form Genetic code* J-coupling as part of NMR spectroscopy* Opal in preparation to be a gemstone* Spin triplet in quantum mechanics — as in triplet oxygen, or simply triplet state in general....
) consisting of a column name, a value, and a timestamp
Timestamp
A timestamp is a sequence of characters, denoting the date or time at which a certain event occurred. A timestamp is the time at which an event is recorded by a computer, not the time of the event itself...
. In a relational
Relational database
A relational database is a database that conforms to relational model theory. The software used in a relational database is called a relational database management system . Colloquial use of the term "relational database" may refer to the RDBMS software, or the relational database itself...
database table, this data would be grouped together within a table with other non-related data.
Two types of column families exist:
- Standard column familyStandard column familyThe standard column family is a NoSQL object that contains columns of related data. It is a tuple 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 standard column family is as a "table", each key-value pair...
: contains only columns - Super column familySuper column familyA super column family is a NoSQL object that contains column families. It is a tuple that consists of a key-value pair, where the key is mapped to a value that are column families. In analogy with relational databases, a super column family is something like a "view" on a number of tables...
: contains a map of super columnSuper columnA super column is a tuple with a binary super column name and a value that maps it to many columns. They consist of a key-value pairs, where the values are columns. Theoretically speaking, super columns are associative array of columns...
s.