NoSQL#

NoSQL (which stands for β€œnot only SQL”) is a term used to describe a database management system that is not based on the traditional relational database model. In contrast to SQL (Structured Query Language) databases, which are based on tables and rows, NoSQL databases are designed to store and manage data in a more flexible and scalable way. NoSQL databases can handle a wide variety of data types, including structured, unstructured, and semi-structured data, and they can be used for a range of applications, such as real-time web applications, big data analytics, and mobile apps. Some examples of NoSQL databases include MongoDB, Cassandra, and CouchDB. NoSQL databases are becoming increasingly popular, as they offer a more scalable and flexible alternative to traditional relational databases for many applications.

Types of NoSQL Databases#

Document Databases#

Document databases store data in the form of documents, such as JSON or XML. Documents are stored together in a collection, and each document can have a different structure. Examples of document databases include MongoDB and Couchbase.

Naming convntions for database objects:

SQL
Relational Database
πŸ“ schema on write

NoSQL
Document Database
πŸ“– schema on read

Cluster

Cluster

Database

Database

Table

Collection

Row

Document

Column

Field

Key-value Databases#

Key-value databases store data as key-value pairs, where each key is a unique identifier for the data and the value is the data itself. Key-value databases are often used for caching and are well-suited for high-performance, high-throughput use cases. Examples of key-value databases include Redis and Riak.

Column-family Databases#

Column-family databases store data in a column-family structure, where each row is grouped together with other rows that have the same key. Column-family databases are well-suited for use cases where the data is highly denormalized, and where there is a lot of data that is read but not updated. Examples of column-family databases include Apache Cassandra and Hbase.

Graph Databases#

Graph databases store data in a graph structure, where each node represents an entity and each edge represents a relationship between entities. Graph databases are well-suited for use cases where the data has a lot of relationships, such as social networks and recommendation engines. Examples of graph databases include Neo4j and Amazon Neptune.

Read more…