Keyspace (distributed data store)
Encyclopedia
A key space in a NoSQL data store
Data store
A data store is a data repository of a set of integrated objects. These objects are modeled using classes defined in database schemas. Data store includes not only data repositories like databases, it is a more general concept that includes also flat files that can store data.Some data stores do...

 is an object that holds together all column families
Column family
A column family is a NoSQL object that contains columns of related data. It is a tuple that consists of a key-value pair, where the key is mapped to a value that is a set of columns. In analogy with relational databases, a column family is as a "table", each key-value pair being a "row". Each...

 of a design. It is the outer most grouping of the data in the data store. It resembles to the schema concept in Relational database management system
Relational database management system
A relational database management system is a database management system that is based on the relational model as introduced by E. F. Codd. Most popular databases currently in use are based on the relational database model....

s. Generally, there is one keyspace per application.

Structure

A keyspace may contain column families or super column
Super column
A super column is a tuple with a binary super column name and a value that maps it to many columns. They consist of a key-value pairs, where the values are columns. Theoretically speaking, super columns are associative array of columns...

s. Each super column contains one or more column family, each column familie at least one column. The keyspace is the highest abstraction in a distributed data store
Distributed data store
A distributed data store is a blurred concept and means either a distributed database where users store their information on a number of nodes, or a network in which a user stores their information on a number of peer network nodes ....

.

Comparison with relational database systems

The keyspace has similar importance like a schema has in a database. In contrast to the schema, however, it does not stipulate any concrete structure, like it is known in the entity-relationship model
Entity-relationship model
In software engineering, an entity-relationship model is an abstract and conceptual representation of data. Entity-relationship modeling is a database modeling method, used to produce a type of conceptual schema or semantic data model of a system, often a relational database, and its requirements...

 used widely in the relational data models. For instance, the contents of the keyspace can be column families, each having different number of columns, or even different columns. So, the column families that somehow relate to the row
Row (database)
In the context of a relational database, a row—also called a record or tuple—represents a single, implicitly structured data item in a table. In simple terms, a database table can be thought of as consisting of rows and columns or fields...

 concept in relational databases do not stipulate any fixed structure. The only point that is the same with a schema is that it also contains a number of "objects", which are tables in RDBMS systems and here column families or super columns.

So, in distributed data stores, the whole burden to handle rows that may even change from data-store update to update lies on the shoulders of the programmers.

Examples

As an example, we show a number of column families in a keyspace. The CompareWith keyword defines how the column comparison is made. In the example, the UTF8 standard has been selected. Other ways of comparison exist, such as AsciiType, BytesType, LongType, TimeUUIDType.


0.01








Another example shows a simplified Twitter
Twitter
Twitter is an online social networking and microblogging service that enables its users to send and read text-based posts of up to 140 characters, informally known as "tweets".Twitter was created in March 2006 by Jack Dorsey and launched that July...

 clone data model:



0.01









See also

  • Column families
    Column family
    A column family is a NoSQL object that contains columns of related data. It is a tuple that consists of a key-value pair, where the key is mapped to a value that is a set of columns. In analogy with relational databases, a column family is as a "table", each key-value pair being a "row". Each...

  • Keyspace (data store)
  • NoSQL
  • Schema (database)

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK