DEV Community

Cover image for NoSQL database
Kavindu Chethani
Kavindu Chethani

Posted on

NoSQL database

What is NoSQL database

That the data is sorted in a document rather than relational tables(Not only SQL). Relational databases rely on tables, columns, rows, or schemas to organize and retrieve data. In contrast, NoSQL database do not rely on these structures and use more flexible data models.

That the data is sorted in a document rather than relational tables. NoSQL databases have unique features. Flexible schemas, Horizontal scaling, Fast queries due to data model, Ease of use for developers.

Most popular NoSQL Databases

MongoDB, CouchDB, CouchBase, Cassandra, HBase, Redis, Riak, Neo4J.

NoSQL database types

  • Document databases
  • Key-Values stores
  • Column oriented databases
  • Graph database

Document databases

Real world example :
Story book contains story in the pages, When we going to add this story book into a relational tables, story texts goes to a one table, authors goes to another table, publishers goes to another table, titles goes to another tables like that we need to handle separate tables. But in the document database we can sorted this into single entity.

A chart showing
The document type databases are sorted in format like JSON.

Key-Values stores

A telephone directory is a good real example, where the key is the person, and the value is the phone number. Key-Value 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.

ex:

img2Key-value stores store everything as a key and a value.

Column oriented databases

Column-oriented NoSQL databases are widely used to manage data warehouses, business intelligence, CRM, Library card catalogs. A column database is faster and more efficient than a traditional database because the data storage is by columns rather than by rows.

ex:

img3

Graph database

Graph base databases mostly used for social networks, logistics, spatial data. Graph database is a database that uses graph structures for semantic queries with nodes, edges, and properties to represent and store data. A key concept of the system is the graph.

ex:

img4

Why we use NoSQL databases?

  • NoSQL provides high level of scalability.
  • It is used in distributed computing environment.
  • Implementation is less costly It provides storage for semi-structured data and it is also provide flexibility in schema.
  • Relationships are less complicated.

Top comments (0)