Types of NoSQL Technologies
Let's run through a list of data store offerings within the NoSQL
flavor.
Document DB/Document Stores: These are organized around the idea that the fundamental thing to store is a self-contained piece of data (called a
document
). Such a document describes its own schema-- this is in opposition to individual rows of data constrained in well-defined columns. Withdocument
s, there generally are no restrictions in shape or structure. It may be inXML
format, but often it'sJSON
-- a loose structure based on plain old Javascript objects.Example: store a simple piece of data consisting of two pieces of information:
title
andrating
. Thetitle
is a string andrating
is an integer.In the next piece of data, we have different descriptions and utilize
nesting
of information.When we are schema-less, we can simply add new documents in this data store freely. The only constraint is that each
document
will be given a uniqueid
. But beyond that, you often have total flexibility. There's no need to provide a formal schema and no need to define relationships. One downfall of this is that the database needs to provide a more flexible way of querying the data-- thus arrived solutions likeCouchDB
andMongoDB
.Key-value databases are another category. Its main emphasis is on having no predefined schema for your data. All it does is store and retrieve everything based on key-value pairs. In some ways, it's like a two-column table (if you had a
key
column andvalue
column), and nothing more is enforced. It could be any data type. You could fit in bits ofXML
orJSON
.Furthermore, It is worth mentioning that many products in this category are specifically designed with fault-tolerant distributed architecture. Simplified, this means you can easily install them across multiple machines. As such, no one machine is a point of failure-- the database can survive machine failures and continue functioning.
Graph: Yet another category of
NoSQL
tech. It is a data store in which everything is kept in the form of connecting nodes, in agraph
structure. There is no one "master" point. Although many other NoSQL DBMS tend to de-emphasize relationships,graph database
s are all about having nodes of data connected to each other, describing relationships among them.Column-oriented database: In a traditional row-oriented database, when we try to retrieve a specific record, every single row is scanned. Indexing certain columns may improve the lookup speed-- however, indexing every column slows down the updating (write) speed. Sometimes it may require you to lock the tables-- if not completely, then partially-- by locking certain parts of your table.
This is where column-oriented databases come in handy. They store individual columns separately, allowing an efficient scan when we have a limited number of columns (because there is only one data type in each table). Therefore, it is very efficient to add new columns. However, adding an entire record becomes more difficult. Although they may look similar to traditional databases, the method of storing and retrieving data is where the actual difference lies. They are best for analytics. Examples of the column-oriented database include but not limited to Cassandra (released by Facebook as an open-source project), Hypertable, Google BigTable, and Apache HBase.