What is NoSQL?
- NoSQL is non-relational Data Management System
- That does not require a fixed schema(schema free)
- Easy to scale(Horizontally scalable)
- Easy replication
- Open source
- No transaction support
Carl Strozz introduced the NoSQL concept in 1998.
NoSQL is used for big-data and real-time web apps. For example, companies like Twitter, Facebook, Google that collect terabytes of user data every single day.
NoSQL database is used for distributed data Stores with humongous data storage needs.
NoSQL database stands for "Not Only SQL" or "Not SQL".
NoSQL database includes simplicity of design, simpler horizontal scaling to cluster of machines and finer control over availability.
The data structures used by NoSQL databases are different from those used by default in relational databases which makes some operations faster in NoSQL.
Why use NoSQL?
The concept of NoSQL databases became popular with Internet giants like Google, Facebook, Amazon, etc. who deal with huge volumes of data. The system response time becomes slow when you use RDBMS for massive volumes of data.
To resolve this problem, we could "scale up" our systems by upgrading our existing hardware. This process is expensive.
The alternative for this issue is to distribute database load on multiple hosts whenever the load increases. This method is known as "scaling out."
Remove the burden of data structures mismatch between application in-memory and relational databases.
Integrate databases using services.
Aggregate oriented databases, are easier to manage and based on domain driven design.
Features of NoSQL
Non-relational
- NoSQL databases never follow the relational model
- work with self-contained aggregated or BLOBs
Schema-free
- NoSQL databases are either schema-free or have relaxed schema
- Do not required any sort of definition of the schema of the data
Distributed
- Multiple NoSQL databases can be executed
- Only providing eventual consistency
- Offers easy to use interfaces for storage and querying data provided.
- APIs allow low-level data manipulation and selection methods.
- Text-based protocols mostly used with HTTP REST with JSON.
Types Of NoSQL Databases
Key Value Pair Based
Data is store in key/value pairs. It is designed in such a way to handle lots of data and heavy load.
For example, Key like "Name" associated with a value like "Perera"
Document NoSQL Database stores and retrieves data as key value pair but the value part is stored as a document. The document is stored in JSON or XML formats.
For examples, Amazon Simple DB, Couch DB, Mongo DB, Riak, Lotus Notes are popular Document DBMS systems.
Column Based
Column Based
Column based databases separates data into discrete columns. Instead of using rows whereby the row ID is the main key column based database systems flip things around to make the data the main key.
Column based NoSQL databases are widely used to manage data warehouses, business intelligence, CRM, Library card catalogs.
examples for column based databases are:
Column based NoSQL databases are widely used to manage data warehouses, business intelligence, CRM, Library card catalogs.
examples for column based databases are:
- HBase
- Cassandra
- Hypertable
The final type of NoSQL databases is graph based. The notable distinction about graph based NoSQL databases is that they contain the relationship between different data. Subsequently, graph databases look quite different to any of the other databases above, they store data as nodes, with the 'edges' of the nodes describing their relationship to other nodes.
Graph databases, compared to relational databases, are multidimensional in nature. They display not just basic relationships between tables and data, but more complex and multifaceted ones.
Graph bases database mostly used for social networks, logistics, spatial data.
Some examples for graph base databases are
- Neo4J
- Infinite Graph
- OrientDB
- FlockDB
Differences between SQL and NoSQL
SQL
- Relational database management system.
- These databases have fixed or static or predefined schema.
- These databases are not suited for hierarchical data storage.
- These databases are best suited for complex queries.
- Vertically scalable.
NoSQL
- Non-relational or distributed database system.
- They have dynamic schema.
- These databases are best suited for hierarchical data storage.
- These databases are not so good for complex queries.
- Horizontally scalable.
Comments
Post a Comment