Jump to content

NoSQL

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by DatabACE (talk | contribs) at 20:09, 19 April 2012. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

In computing, NoSQL is a class of database management system identified by its non-adherence to the widely-used relational database management system (RDBMS) model:

  • It does not use SQL as its query language
NoSQL database systems rose alongside major internet companies, such as Google, Amazon, and Facebook, which had significantly different challenges in dealing with huge quantities of data that the traditional RDBMS solutions could not cope with. NoSQL database systems are developed to manage large volumes of data that do not necessarily follow a fixed schema. Data is partitioned among different machines (for performance questions and due its size) so JOIN operations are not usable and ACID guarantees are not given.
  • It may not give full ACID guarantees
Usually only eventual consistency is guaranteed or transactions limited to single data items. This means that given a sufficiently long period of time over which no changes are sent, all updates can be expected to propagate eventually through the system.
  • It has a distributed, fault-tolerant architecture
Several NoSQL systems employ a distributed architecture, with the data held in a redundant manner on several servers. In this way, the system can easily scale out by adding more servers, and failure of a server can be tolerated. This type of database typically scales horizontally and is used for managing with big amounts of data, when the performance and real-time nature is more important than consistency (as indexing a large number of documents, serving pages on high-traffic websites, and delivering streaming media).

NoSQL database systems are often highly optimized for retrieve and append operations and often offer little functionality beyond record storage (e.g. key-value stores). The reduced run time flexibility compared to full SQL systems is compensated by significant gains in scalability and performance for certain data models.

In short, NoSQL database management systems are useful when working with a huge quantity of data and the data's nature does not require a relational model for the data structure. The data could be structured, but it is of minimal importance and what really matters is the ability to store and retrieve great quantities of data, and not the relationships between the elements. For example, to store millions of key-value pairs in one or a few associative arrays or to store millions of data records. This is particularly useful for statistical or real-time analyses for growing list of elements (such as Twitter posts or the Internet server logs from a big group of users).

History

Carlo Strozzi used the term NoSQL in 1998 to name his lightweight, open-source relational database that did not expose the standard SQL interface.[1] (Strozzi suggests that, as the current NoSQL movement "departs from the relational model altogether; it should therefore have been called more appropriately 'NoREL', or something to that effect.")[2]

Eric Evans, a Rackspace employee, reintroduced the term NoSQL in early 2009 when Johan Oskarsson of Last.fm wanted to organize an event to discuss open-source distributed databases.[3] The name attempted to label the emergence of a growing number of non-relational, distributed data stores that often did not attempt to provide ACID (atomicity, consistency, isolation, durability) guarantees, which are the key attributes of classic relational database systems such as Sybase, IBM DB2, MySQL, Microsoft SQL Server, PostgreSQL, Oracle RDBMS, Informix, Oracle Rdb, etc.

In 2011, work began on UnQL (Unstructured Query Language), a specification for a query language for NoSQL databases.[4] It is built to query collections (versus tables) of documents (versus rows) with loosely defined fields (versus columns). UnQL is claimed to be a superset of SQL within which SQL is a very constrained type of UnQL for which the queries always return the same fields (same number, names and types). However, UnQL does not cover the data definition language (DDL) SQL statements like CREATE TABLE or CREATE INDEX.[5]

Architecture

Typical modern relational databases have shown poor performance on certain data-intensive applications, including indexing a large number of documents, serving pages on high-traffic websites, and delivering streaming media.[6] Typical RDBMS implementations are tuned either for small but frequent read/write transactions or for large batch transactions with rare write accesses. NoSQL, on the other hand, can service heavy read/write workloads.[6] Real-world NoSQL deployments include Digg's 3 TB for green badges (markers that indicate stories voted for by others in a social network; this lasted less than three months and was abandoned.),[7] the 6 TB database of the European Commission's ENSEMBLE platform for air quality models evaluation and intercomparison [8] and Facebook's 50 TB for inbox search.[9]

NoSQL architectures often provide weak consistency guarantees, such as eventual consistency, or transactions restricted to single data items. Some systems, however, provide full ACID guarantees in some instances by adding a supplementary middleware layer (e.g., AppScale and CloudTPS).[10][11] Two systems have been developed that provide snapshot isolation for column stores: Google's Percolator system based on BigTable,[12] and a transactional system for HBase developed at the University of Waterloo.[13] These systems, developed independently, use similar concepts to achieve multi-row distributed ACID transactions with snapshot isolation guarantee for the underlying column store, without the extra overhead of data management, middleware system deployment, or maintenance introduced by the middleware layer.

Several NoSQL systems employ a distributed architecture, with the data held in a redundant manner on several servers, often using a distributed hash table. In this way, the system can readily scale out by adding more servers, and failure of a server can be tolerated.[14]

Some NoSQL advocates[who?] promote very simple interfaces such as associative arrays or key-value pairs. Other systems, such as native XML databases, promote support of the XQuery standard.[citation needed] Newer systems such as CloudTPS also support join queries.[15]

Taxonomy

Often, NoSQL databases are categorized according to the way they store the data and fall under categories such as key-value stores, BigTable implementations, document store databases, and graph databases. NoSQL database systems rose alongside major internet companies, such as Google, Amazon, Twitter, and Facebook which had significantly different challenges in dealing with data that the traditional RDBMS solutions could not cope with (although most of Facebook's infrastructure is built on SQL databases[16] and so is Twitter's [17]).[citation needed] With the rise of the real-time web, there was a need to provide curated information out of large volumes of data which more or less followed similar horizontal structures. These companies realized that performance and real-time nature was more important than consistency, which traditional relational databases were spending a high amount of processing time to achieve.[citation needed] As such, NoSQL databases are often highly optimized for retrieve and append operations and often offer little functionality beyond record storage (e.g. key-value stores). The reduced run time flexibility compared to full SQL systems is compensated by significant gains in scalability and performance for certain data models.[citation needed]

NoSQL implementations can be categorized by their manner of implementation:

Document store

A document-oriented database stores, retrieves, and manages semi structured data. The element of data is called document.

Different implementations offer different ways of organizing and/or grouping documents:

  • Collections
  • Tags
  • Non-visible Metadata
  • Directory hierarchies

Compared to relational databases we could say, by example, collections are as tables, and documents are as records. But there is one big difference: every record in a table have the same number of fields, while documents in a collection could have completely different fields.

Encodings in use include XML, YAML, JSON, and BSON, as well as binary forms like PDF and Microsoft Office documents (MS Word, Excel, and so on).

Documents are addressed in the database via a unique key that represents that document. One of the other defining characteristics of a document-oriented database is that, beyond the simple key-document (or key-value) lookup that you can use to retrieve a document, the database will offer an API or query language that will allow you to retrieve documents based on their contents.

Name Language Notes
BaseX Java, XQuery XML database
Clusterpoint C++ geared for Full text search
Apache CouchDB Erlang JSON store
eXist XQuery XML database
Jackrabbit Java
Lotus Notes and IBM Lotus Domino LotusScript, Java, IBM X Pages, others MultiValue
MarkLogic Server XQuery XML database
MongoDB C++ BSON store (binary format JSON)
OpenLink Virtuoso C++, C#, Java, SPARQL middleware and database engine hybrid
OrientDB Java
SimpleDB Erlang
Terrastore Java

Graph

This kind of databases are thought for data whose relations are well represented with a graph-style (elements interconnected with an undetermined number of relations between them). The kind of data could be social relations, public transport links, road maps or network topologies, by example.

Name Language Notes
AllegroGraph SPARQL RDF GraphStore
DEX Java, C++ High-performance Graph Database
FlockDB Scala
InfiniteGraph Java High-performance, scalable, distributed Graph Database
Neo4j Java
OpenLink Virtuoso C++, C#, Java, SPARQL middleware and database engine hybrid
OrientDB Java
Pregel
Sones GraphDB C#
OWLIM Java, SPARQL 1.1 RDF graph store with reasoning

Key-value store

Key-value stores allow the application to store its data in a schema-less way. The data could be stored in a datatype of a programming language or an object. Because of this, there is no need for a fixed data model.[18] [19] The following types exist:

Eventually‐consistent key‐value store

Hierarchical key-value store

Hosted services


Key-value cache in RAM

Key-value stores on solid state or rotating disk

Ordered key-value stores

Multivalue databases

Object database

RDF database

Tabular

Tuple store

See also

References

  1. ^ Lith, Adam (2010). "Investigating storage solutions for large data: A comparison of well performing and scalable data storage solutions for real time extraction and batch insertion of data" (PDF). Göteborg: Department of Computer Science and Engineering, Chalmers University of Technology. p. 15. Retrieved 12 May 2011. Carlo Strozzi first used the term NoSQL in 1998 as a name for his open source relational database that did not offer a SQL interface[...] {{cite web}}: More than one of |pages= and |page= specified (help); Unknown parameter |coauthors= ignored (|author= suggested) (help)
  2. ^ "NoSQL Relational Database Management System: Home Page". Strozzi.it. 2 October 2007. Retrieved 29 March 2010.
  3. ^ "NOSQL 2009". Blog.sym-link.com. 12 May 2009. Retrieved 29 March 2010.
  4. ^ http://unqlspec.org/display/UnQL/Home
  5. ^ Avram, Abel (04). "Interview: Richard Hipp on UnQL, a New Query Language for Document Databases". http://www.infoq.com. Retrieved 7 September 2011. {{cite web}}: Check date values in: |date= and |year= / |date= mismatch (help); External link in |publisher= (help); Unknown parameter |month= ignored (help)
  6. ^ a b Agrawal, Rakesh; et al. (2008). "The Claremont report on database research" (PDF). SIGMOD Record. 37 (3). ACM: 9–19. doi:10.1145/1462571.1462573. ISSN 0163-5808. {{cite journal}}: Explicit use of et al. in: |author= (help)
  7. ^ "Looking to the future with Cassandra | Digg About". About.digg.com. 9 September 2009. Retrieved 29 March 2010.
  8. ^ "ENSEMBLE". ensemble.jrc.ec.europa.eu. 24 February 2012. Retrieved 24 February 2012.
  9. ^ "Cassandra". facebook.com. 25 August 2008. Retrieved 19 August 2011.
  10. ^ "Datastore Agnostic Transaction Support for Cloud Infrastructures" (PDF). IEEE. 4 July 2011.
  11. ^ "CloudTPS: Scalable Transactions for Web Applications in the Cloud". Globule.org. Retrieved 29 March 2010.
  12. ^ "Large-scale Incremental Processing Using Distributed Transactions and Notifications" (PDF). The 9th USENIX Symposium on Operating Systems Design and Implementation (OSDI 2010), 4–6 Oct 2010, Vancouver, BC, Canada. Retrieved 15 October 2010.
  13. ^ "Supporting Multi-row Distributed Transactions with Global Snapshot Isolation Using Bare-bones [[HBase]]" (PDF). The 11th ACM/IEEE International Conference on Grid Computing (Grid 2010), 25-29 Oct 2010, Brussels, Belgium. Retrieved 15 October 2010. {{cite web}}: URL–wikilink conflict (help)
  14. ^ "Cassandra: Structured Storage System over a P2P Network" (PDF). Retrieved 29 March 2010.
  15. ^ "Consistent Join Queries in Cloud Data Stores". Globule.org. Retrieved 31 January 2011.
  16. ^ Callaghan, Mark. "MySQL and Database Engineering". Retrieved 7 March 2012.
  17. ^ Cole, Jeremy. "MySQL at Twitter". Retrieved 16 April 2012.
  18. ^ Sandy (14 January 2011). "Key Value stores and the NoSQL movement". http://dba.stackexchange.com/questions/607/what-is-a-key-value-store-database: Stackexchange. Retrieved 1 January 2012. Key value stores allow the application developer to store schema-less data. This data is usually consisting of a string that represents the key, and the actual data that is considered to be the value in the "key - value" relationship. The data itself is usually some kind of primitive of the programming language (a string, an integer, an array) or an object that is being marshalled by the programming languages bindings to the key value store. This replaces the need for fixed data model and makes the requirement for properly formatted. {{cite web}}: External link in |location= (help)CS1 maint: location (link)
  19. ^ Marc Seeger (21 September 2009). "Key-Value Stores: a practical overview" (PDF). http://blog.marc-seeger.de/2009/09/21/key-value-stores-a-practical-overview/: Marc Seeger. Retrieved 1 January 2012. Key-Value stores provide a high performance alternative to relational database systems when it comes to storing and accessing data. This paper provides a short overview over some of the currently available key-value stores and their interface to the Ruby programming language. {{cite web}}: External link in |location= (help)CS1 maint: location (link)
  20. ^ "Riak: An Open Source Scalable Data Store". 28 November 2010. Retrieved 28 November 2010.
  21. ^ Tweed, Rob (2010). "A Universal NoSQL Engine, Using a Tried and Tested Technology" (PDF). p. 25. Without exception, the most successful and well-known of the NoSQL databases have been developed from scratch, all within just the last few years. Strangely, it seems that nobody looked around to see whether there were any existing, successfully implemented database technologies that could have provided a sound foundation for meeting Web-scale demands. Had they done so, they might have discovered two products, GT.M and Caché... {{cite web}}: Unknown parameter |coauthors= ignored (|author= suggested) (help); line feed character in |quote= at position 82 (help)