Standard column family

A standard column family consists of a (unique) row key and a number of columns.

The standard column family is a NoSQL object that contains columns of related data. It is a tuple (pair) 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 standard column family is as a "table", each key-value pair being a "row".[1] Each column is a tuple (triplet) consisting of a column name, a value, and a timestamp.[2] In a relational database table, this data would be grouped together within a table with other non-related data.[3]

Standard column families are column containers sorted by their names can be referenced and sorted by their row key.[4]

Contents

Benefits

Accessing the data in a distributed data store would be expensive (time-consuming), if it would be saved in form of a table. It would also be inefficient to read all column families that would make up a row in a relational table and put it together to form a row, as the data for it is distributed on a large number of nodes. Therefore, the user accesses only the related information required.

As an example, a relational table could consist of the columns UID, first name, surname, birthdate, gender, etc. In a distributed data store, the same table would be implemented by creating columns families for "UID, first name, surname", "birthdate, gender", etc. If one needs only the males that were born between 1950 and 1960, for a query in the relational database, all the table has to be read. In a distributed data store, it suffices to access only the second standard column family, as the rest of information is irrelevant.

Sorting and querying

There is no way to sort columns, nor to query an arbitrary query in distributed data stores. Columns are sorted when they are added to the column family. The way of sorting is defined by an attribute. For instance, this is done by the CompareWith attribute in Apache Cassandra that can have the following values:

  • AsciiType
  • BytesType
  • LexicalUUIDType
  • LongType
  • TimeUUIDType
  • UTF8Type

It is also possible to add some user-defined sorting attributes. Using this way of sorting makes the process extremely quick.[5]

Standard column families vs. rows

Standard column families have a schemeless nature so that each of their "row"s can contain a different number of columns, and even different column names could be in each row.[6] So, they are a very different concept than the rows in relational database management system (RDBMS)s. This is one of the reasons why the concept is not trivial for an experienced RDBMS expert.

Examples

In JSON-like notation, a column family definition would look as follows:

UserProfile = {
 Cassandra = { emailAddress:”casandra@apache.org” , age:”20}
 TerryCho = { emailAddress:”terry.cho@apache.org” , gender:”male”}
 Cath = { emailAddress:”cath@apache.org” , age:”20,gender:”female”,address:”Seoul”}
 }

References

  1. ^ "Column Families 101". Max's Output. http://wiki.toadforcloud.com/index.php/Column_Families_101. Retrieved 2011-03-18. 
  2. ^ Max's Output. "A Quick Introduction to the Cassandra Data Model: 1) Cassandra is based on a key-value model". Max Grinev. http://maxgrinev.com/2010/07/09/a-quick-introduction-to-the-cassandra-data-model/. Retrieved 2011-03-18. "A standard column family is a set of key-value pairs. I know the terminology is confusing but so far it is just basic key-value model. Drawing an analogy with relational databases, you can think about standard column family as table and a key-value pair as a record in a table." 
  3. ^ "Column Families 101". Toad for Cloud. http://wiki.toadforcloud.com/index.php/Column_Families_101. Retrieved 2011-03-18. 
  4. ^ "Cassandra’s data model cheat sheet: standard column family". http://www.javageneration.com/: Chaker Nakhli's Blog - Yet another technical blog.. http://www.javageneration.com/?p=70. Retrieved 2011-03-29. "A container for columns sorted by their names. Column Families are referenced and sorted by row keys." 
  5. ^ "Installing and using Apache Cassandra With Java Part 3 (Data model 2)". http://www.sodeso.nl/: Sodeso - Software Development Solutions. http://www.sodeso.nl/?p=207. Retrieved 2011-03-30. "Sorting can be specified on the ColumnFamily CompareWith attribute, these are the options you can choose from (it is possible to create custom sorting behavior but we will cover that later): BytesType, UTF8Type, LexicalUUIDType, TimeUUIDType, AsciiType, LongType" 
  6. ^ Posted by Terry (2010-03-22). "Apache Cassandra Quick tour". Terry.Cho's blog. http://javamaster.wordpress.com/2010/03/22/apache-cassandra-quick-tour/. Retrieved 2011-03-25. "One of interest thing is each row can have different scheme. Cassandra row has “emailAddress” ,”age” column. TerryCho row has “emailAddress”,”gender” column. This characteristic is called as “Schemeless” (Data structure of each row in standard column family can be different)." 

See also

External links


Wikimedia Foundation. 2010.

Look at other dictionaries:

  • Column family — A column family is a NoSQL object that contains columns of related data. It is a tuple (pair) 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 …   Wikipedia

  • Standard Vanguard — Infobox Automobile name = Standard Vanguard manufacturer = Standard Motor Company production = 1947 1963 predecessor = none successor = Triumph 2000 related = designer = The Standard Vanguard is a car produced by the Standard Motor Company in… …   Wikipedia

  • Atari 8-bit family — The Atari 8 bit family is a series of 8 bit home computers manufactured from 1979 to 1992. All are based on the MOS Technology 6502 CPU and were the first home computers designed with custom coprocessor chips, giving them the most powerful… …   Wikipedia

  • Atom (standard) — For Atom feeds from Wikipedia, see Wikipedia:Syndication. Atom The feed icon used in several browsers Filename extension .atom, .xml …   Wikipedia

  • Corrick Family Entertainers — The Corrick Family was a troupe of musicians and entertainers from Christchurch, New Zealand. They toured widely throughout New Zealand, Australia, India, Southeast Asia and England during the period 1898 to 1915. They advertised themselves… …   Wikipedia

  • Vizetelly Family — ▪ Italian publishing family originally  spelled Vizzetelli,         family of Italian descent active in journalism and publishing from the late 18th century in England and later in France (briefly) and the United States.       James Henry… …   Universalium

  • Revised Standard Version — Bible translation infobox | translation title = Revised Standard Version full name = Revised Standard Version abbreviation = RSV NT published = 1946 OT published = 1952 derived from = American Standard Version textual basis = NT: Medium… …   Wikipedia

  • Victor Lewis-Smith — is a British satirist, producer, critic and prankster. He was educated at the University of York [http://education.independent.co.uk/higher/az uni colleges/article1208721.ece] . He is known for his sarcasm and biting criticism.Radio and… …   Wikipedia

  • Oldsmobile Cutlass — Manufacturer General Motors Production 1961–1999 Predecessor Oldsmobile Cutlass Cier …   Wikipedia

  • Ezra Levant — (born 1972) is a Canadian blogger, author, journalist, lawyer and conservative political activist. He is the former publisher of the Western Standard magazine. Family and early lifeBorn in Calgary, Levant holds a commerce degree from the… …   Wikipedia


Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”

We are using cookies for the best presentation of our site. Continuing to use this site, you agree with this.