NOSQL
NOSQL
•1998- Carlo Strozzi use the term NoSQL for his lightweight, open-source relational
database
•2000- Graph database Neo4j is launched
•2004- Google BigTable is launched
•2005- CouchDB is launched
•2007- The research paper on Amazon Dynamo is released
•2008- Facebooks open sources the Cassandra project
•2009- The term NoSQL was reintroduced
What is NoSQL?
NoSQL is a non-relational DBMS, that does not require a fixed schema, avoids joins,
and is easy to scale.
NoSQL database is used for distributed data stores with humongous data storage
needs. NoSQL is used for Big data and real-time web apps.
NoSQL database stands for "Not Only SQL" or "Not SQL." Though a better term would
NoREL NoSQL caught on.
NoSQL database system encompasses a wide range of database technologies
Solution: Distribute database, add hosts whenever the load increases. This method is
known as "scaling out.
Features of NoSQL
1. Non-relational
2. Schema-free
3. Simple API
4. Distributed
1. Non-relational
• NoSQL databases never follow the relational model
• Never provide tables with flat fixed-column records
• Work with self-contained aggregates or BLOBs - Binary Large OBject (BLOB)
• Doesn't require object-relational mapping and data normalization
• No complex features like query languages, query planners, referential integrity joins,
ACID
2. Schema-free
• Offers easy to use interfaces for storage and querying data provided
Four categories of NoSQL databases. Each of these categories has its unique attributes
and limitations. No specific database is better to solve all problems. You should select a
database based on your product needs.
1. Key-value Pair Based
2. Document-oriented
3. Column-oriented
4. Graphs based
1. Key Value Pair Based
Key-value pair storage databases store data as a hash table where each key is
unique, and the value can be a JSON, BLOB(Binary Large Objects), string, etc.
e.g: Redis, Dynamo, Riak. They are all based on Amazon's Dynamo paper.
2. Document-Oriented:
Stores and retrieves data as a key value pair but the value part is stored as a
document.
The document is stored in JSON or XML formats.
The value is understood by the DB and can be queried.
Relational Vs Document
A document database, you have data store like JSON object. You do not require to
define which make it flexible.
Used for CMS systems, blogging platforms, real-time analytics & e-commerce
applications.
Not Suitable for complex transactions which require multiple operations or queries
against varying aggregate structures.
Column-oriented databases work on columns and are based on BigTable paper by Google.
Every column is treated separately.
Values of single column databases are stored contiguously.
They deliver high performance on aggregation queries like SUM, COUNT, AVG, MIN
etc. as the data is readily available in a column.
A graph type database stores entities as well the relations amongst those entities.
Traversing relationship is fast as they are already captured into the DB, and there is
no need to calculate them.
Graph base database mostly used for social networks, logistics, spatial data.
The most common data retrieval mechanism is the REST-based retrieval of a value based
on its key/ID with GET resource
Document store Database offers more difficult queries as they understand the value in a
key-value pair.
• Easy Replication
• Can handle structured, semi-structured, and unstructured data with equal effect
• Handles big data which manages data velocity, variety, volume, and complexity
•Offers a flexible schema design which can easily be altered without downtime or
service disruption
Disadvantages of NoSQL
• No standardization rules