Super column
Encyclopedia
A super 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...

 (a pair) 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 (sorted
Sorting algorithm
In computer science, a sorting algorithm is an algorithm that puts elements of a list in a certain order. The most-used orders are numerical order and lexicographical order...

) associative array
Associative array
In computer science, an associative array is an abstract data type composed of a collection of pairs, such that each possible key appears at most once in the collection....

 of columns. Similar to a regular column family
Column family
A 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 column family is as a "table", each key-value pair being a "row". Each...

 where a row is a sorted map of column names and column values, a row in a super column family is a sorted map of super column names that maps to column names and column values.

A super column is part of a keyspace (data model) together with other super columns and column families, and columns.

Code example

Written in the JSON
JSON
JSON , or JavaScript Object Notation, is a lightweight text-based open standard designed for human-readable data interchange. It is derived from the JavaScript scripting language for representing simple data structures and associative arrays, called objects...

-like syntax, a super column definition can be like this:


{
"mccv": {
"Tags": {
"cassandra": {
"incubator": {"incubator": "http://incubator.apache.org/cassandra/"},
"jira": {"jira": "http://issues.apache.org/jira/browse/CASSANDRA"}
},
"thrift": {
"jira": {"jira": "http://issues.apache.org/jira/browse/THRIFT"}
}
}
}
}
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK