Databases Reference
In-Depth Information
Fig. 1.3
Cassandra's super column (source: [ 16 ])
name: "Name",
value: "Jane Doe",
timestamp: 125555555
},
Address: {
name: "Address",
value: "25 Main Street",
timestamp: 125555555
},
Genre: {
name: "Genre",
value: "F",
timestamp: 125555555
}
}
}
In this example, the column family has two rows, identified by row keys “User1”
and “User2,” respectively.
Each column family is stored in a separate file and therefore the columns of a
family should be those that are frequently accessed together. Row key in Cassandra
serves a role similar to a primary key in relational databases to join tables together.
It is important to note that row keys are entered by the client, the purpose being that
in order to store column families across a number of hosting servers in a distributed
manner, row key is used to determine which server to store the data.
Cassandra also provides another layer of data abstraction: super columns and
super column families (Fig. 1.3 ). A super column is a name-value pair like a standard
column but the value of a super column is a map of columns, not an atomic value.
Unlike a row in a regular column family which is basically a sorted map of f column
Search WWH ::




Custom Search