Super column: Difference between revisions
Appearance
Content deleted Content added
+ cat |
→Code example: Change "jira" column name to "url". |
||
Line 25: | Line 25: | ||
"Tags": { |
"Tags": { |
||
"cassandra": { |
"cassandra": { |
||
"incubator": {" |
"incubator": {"url": "http://incubator.apache.org/cassandra/"}, |
||
"jira": {" |
"jira": {"url": "http://issues.apache.org/jira/browse/CASSANDRA"} |
||
}, |
}, |
||
"thrift": { |
"thrift": { |
||
"jira": {" |
"jira": {"url": "http://issues.apache.org/jira/browse/THRIFT"} |
||
} |
} |
||
} |
} |
Revision as of 05:26, 18 October 2013
![](http://upload.wikimedia.org/wikipedia/commons/thumb/7/78/SuperColumn_%28data_store%29.png/300px-SuperColumn_%28data_store%29.png)
A super column is a tuple (a pair) with a binary super column name and a value that maps it to many columns.[1] They consist of a key-value pairs, where the values are columns. Theoretically speaking, super columns are (sorted) associative array of columns.[2] Similar to a regular column family 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-like syntax, a super column definition can be like this:
{
"mccv": {
"Tags": {
"cassandra": {
"incubator": {"url": "http://incubator.apache.org/cassandra/"},
"jira": {"url": "http://issues.apache.org/jira/browse/CASSANDRA"}
},
"thrift": {
"jira": {"url": "http://issues.apache.org/jira/browse/THRIFT"}
}
}
}
}
See also
References
- ^ Arin Sarkissian (2009-09-01). "WTF is a SuperColumn? An Intro to the Cassandra Data Model". http://arin.me/: Arin Sarkissian.
A SuperColumn is a tuple with a binary name & a value which is a map containing an unbounded number of Columns – keyed by the Column's name.
{{cite web}}
:|access-date=
requires|url=
(help); External link in
(help); Missing or empty|location=
|url=
(help) - ^ "Cassandra wiki: Data Model: Super columns". http://wiki.apache.org/cassandra/DataModel: Apache Cassandra. Retrieved 2011-03-18.
{{cite web}}
: External link in
(help)|location=
External links