In recent times the term NoSQL has become a buzz word in tech domain. It is often paraphrased as not only SQL. There are varieties of NoSQL databases like couchDB, mongoDB etc. Lets understand what is NoSQL and how it is being used to overcome limitations of 40 years old relational database technologies.
The most important factors for the rise of NoSQL is driven by four factors:
- Large number of users
- Large quantity of data
- Internet of things
- Cloud Computing
NoSQL comprises of a wide variety of different database technologies that
were developed due to a tremendous rise in the volume of data stored about
users, objects and products, the frequency in which this data is
accessed, and performance and processing needs. Relational databases, on
the other hand, were not designed to cope with the scale and agility
challenges that face modern applications, nor were they built to take
advantage of the cheap storage and processing power available today.
The storage mechanism of NoSQL and relational databases are also very different in nature.
Relational databases collects data and segregates it into various interrelated tables and while fetching, the information has to be collected from many tables.
Similarly write operation needs to be performed carefully.
NoSQL databases have a different method altogether. For instance, a
document-oriented NoSQL database takes the data you want to store and
aggregates it into documents using the JSON format which can directly be accessed by the application.
NoSQL Database Types
-
Document databases
pair each key with a complex data structure known as a document.
Documents can contain many different key-value pairs, or key-array
pairs, or even nested documents.
-
Graph stores
are used to store information about networks, such as social connections. Graph stores include Neo4J and HyperGraphDB.
-
Key-value stores
are the simplest NoSQL databases. Every single item in the database is
stored as an attribute name (or "key"), together with its value.
Examples of key-value stores are Riak and Voldemort. Some key-value
stores, such as Redis, allow each value to have a type, such as
"integer", which adds functionality.
-
Wide-column stores
such as Cassandra and HBase are optimized for queries over large datasets, and store columns of data together, instead of rows.