Databases Reference
In-Depth Information
The basic elements of the Cassandra data model are as follows:
Column
Super Column
Column Family
Keyspace
Cluster
Column: A column is the basic unit of Cassandra data model. A column comprises
name, value and a time stamp (by default). An example of column in JSON format is as
follows:
{ // Example of Column
"name": "EmployeeID",
"value": "10029277",
"timestamp": 123456789
}
Super Column: A super column is a dictionary of boundless number of columns,
identified by the column name. An example of a super column in JSON format is as
follows:
{ // Example of Super Column
"name": "Specialization",
"value": {
"role" : {
"name": "role", "value": "Master Technology Architect", "timestamp":
123456789
},
"designation" : {
"name": "designation", "value": "Managing Director", "timestamp": 123456789
}
}
The major differences between a column and a super column are:
Column's value is a string but the super column's value is a record
of columns.
A super column doesn't include any time stamp (only term's
name and value).
Cassandra does not index sub-columns, so when a super column is loaded into
memory, all of its columns are loaded as well.
Note
 
 
Search WWH ::




Custom Search