NoSQL
NoSQL
on
NoSQL
“Towards the end of RDBMS ?”
Attributes
Tuples
Name
Issues with RDBMS- Scalability
3
Sharding
Scaling RDBMS
4
Master-Slave Sharding
All writes are written to the master. Scales well for both reads and
All reads are performed against writes.
the replicated slave databases. Not transparent, application needs
Critical reads may be incorrect as to be partition-aware.
writes may not have been Can no longer have relationships or
propagated down. joins across partitions.
Large data sets can pose problems Loss of referential integrity across
as master needs to duplicate data shards.
to slaves.
What is NoSQL
5
Stands for Not Only SQL. Term was redefined by Eric Evans after Carlo
Strozzi.
Class of non-relational data storage systems.
Do not require a fixed table schema nor do they use the concept of joins.
Relaxation for one or more of the ACID properties (Atomicity, Consistency,
Isolation, Durability) using CAP theorem.
Need of NoSQL
6
Explosion of social media sites (Facebook, Twitter, Google etc.) with large
data needs. (Sharding is a problem)
We would avoid it for systems that are in early development, changing query patterns.
Document Based
10
Example: Lotus Notes, MongoDB, Couch DB, Orient DB, Raven DB.
We use it for content management systems, blogging platforms, web analytics, real-time analytics,
e- commerce applications.
We would avoid it for systems that need complex transactions spanning multiple operations or
queries against varying aggregate structures.
Graph Based
11
We can have at most two of these three properties for any shared-data system
Everyone who builds big applications builds them on CAP : Google, Yahoo,
Facebook, Amazon, eBay, etc.
Advantages of NoSQL
13
Joins
Group by
ACID transactions
SQL
Integration with applications that are based on SQL
Where to use NoSQL
15
NoSQL Data storage systems makes sense for applications that process very large
semi-structured data –like Log Analysis, Social Networking Feeds, Time-based
data.
To improve programmer productivity by using a database that better matches an
application's needs.
To improve data access performance via some combination of handling larger data
volumes, reducing latency, and improving throughput.
Conclusion
16
All the choices provided by the rise of NoSQL databases does not mean the demise
of RDBMS databases as Relational databases are a powerful tool.
We are entering an era of Polyglot persistence, a technique that uses different data
storage technologies to handle varying data storage needs. It can apply across an
enterprise or within an individual application.
References
17