Global Positioning System Reference
In-Depth Information
Table 9. A key mapping for restaurants.
keys
super columns
super columns' name
columns
name
value
1
p 1
name
Friday
lat
24.805
lng
120.995
3
p 2
name
McDonald's
lat
24.794
lng
121.002
p 3
name
KFC
lat
24.794
lng
121.005
those tables are spread across multiple servers, it will take more time to
lock the tables, update the data and release the locks. However, for CDMs,
making data consistent is easier due to the data being stored on multiple
servers. In addition, CDMs should ensure the CAP (Gray 1981) theorem,
stating that a distributed system satisfi es at least two of the three guarantees:
Consistency, Availability and Partition tolerance, at the same time. HBase
and Cassandra guarantee CP and AP, respectively. Compared with RDMBSs,
CDMs can handle scalable data well.
Basic Operations
Based on the BigTable-like's data model, HBase and Cassandra develop new
basic operations for reading, writing, updating and deleting data. Different
from the language used in RDBMSs', i.e., structured query language (SQL),
HBase and Cassandra provide key-value based queries that retrieve a record
by specifying keys. The basic operations in HBase/Cassandra are described
in detail as follows. Note that these operations are performed by given keys,
column names or super column names.
In HBase, there are four primary basic operations as follows: get : returns
attributes for a specifi ed row; set : either adds new rows to a table (if the
key is new) or updates existing rows (if the key already exists); scan : allows
iterations over multiple rows for specifi ed attributes; and delete: removes
a row from a table.
In Cassandra, the basic operations are as follows: get : gets the column
or super column at the given column's name or super column's name in a
column family; get_slice : gets the group of columns contained by a column
family name or a column family/super column name pair specifi ed by
the given columns' names or a range of columns' names; multigetslice :
Search WWH ::




Custom Search