Keys and cells

Hypertable flattens out the table structure into a sorted list of key/value pairs, each one representing a cell in the table. The key includes the full row and column identifier, which means each cell is provided complete addressing information. The column identifier is composed of a colunm family and optionally a column qualifier. Hypertable extends the traditional two-dimensional table model by adding a third dimension - the timestamp. This timestamp dimension can be thought of as representing different versions of each table cell.

 

The Key class defines the key components which can be set or retrieved:

var key = new Key
   {
      Row = "row-identifier",
      ColumnFamily = "column-family",
      ColumnQualifier = "column-qualifier", // optional
      DateTime = DateTime.UtcNow // optional
   };

 

The full qualified column identifier is accessable through the Column property:

var key = new Key
   {
      Row = "row-identifier",
      Column = "column-family:column-qualifier"
   };

 

The Generate method generates a unique, base85 encode, row key:

var guid = Key.Generate();

 

The Cell class represents a Hypertable cell, it is composed of a cell key, cell value (byte array) and a cell flag:

var key = new Key
   {
      Row = "row-identifier",
      Column = "column-family:column-qualifier"
   };

byte[] value = ...;

var cell = new Cell
   {
      Key = key,
      Value = value,
      Flag = CellFlag.Default // optional, CellFlag.Default is the default cell flag
   };