NoSQL database is not a relational database, Its designed for distributed storage for huge data needs (like facebook,linkedin) , they don't have any fixed schema and no joins.
Here they grow horizontally in cluster whereas RDBMS depends on computation power of hardware. Here it should be noted that it does not mean 'No SQL at all' rather 'Not Only SQL'.
Means SQL and No SQL will exist together to serve the business requirements.
Its not that that relational databases lack anything , they just have their limitations:
- They allow joins and indexes
- Fixed Schema
- They allow update of records
Four categories of No SQL Databases :
Key-Value Store : Its the simplest and easiest to implement No SQL Database , everything has key
here from hash table .
Examples: Redis , Voldemort
Applications : Logging
Data Model : Collection of Key-Value Pair.
Weakness : Data has no schema.
Strength : Its used for Fast lookups.
Column Family Store : They were created to process and store very huge amount of data distributed over many machines/nodes. Here keys point to multiple columns. Columns are grouped by column family.
Examples : Cassandra , Hbase
Applications : Distributed storage
Data Model : Columns to Column Families
Strength : Good distributed storage of data along with fast lookup
Weakness : Very low level API
Document Databases : It pairs each key value with data structure known as Documents. Documents can contain many key value pairs or key-array pairs .
Examples : MongoDB
Applications : Web Applications
Data Model : Grouping of Key-Value Collections.
Strength : Incomplete data can also be handled.
Weakness : No standard query syntax for Documents.
Graph Databases : Its used to store and analyse information about networks such as travel portal , social connections.
Examples : Neo4J , Infinite Graph
Applications : Social Media , Travel Portal
Data Model : 'Graph'- Nodes
Strengths : Shortest Path , Degree Relationship
Weakness : Not easy for cluster to handle as it needs to traverse whole graph for an answer.
Generally we should implement NoSQL where data model is dynamic and horizantal scalability is more important .
Related posts :