NoSQL databases, also known as "non-SQL" or "not only SQL," are a type of database that provides a mechanism for storage and retrieval of data that is modeled in means other than the tabular relations used in relational databases. They are especially useful when working with large sets of distributed data. NoSQL databases come in four main types: Key-Value Stores, Document Databases, Column Stores, and Graph Databases.
Key-Value Stores are the simplest type of NoSQL databases. Every single item in the database is stored as an attribute name, or key, together with its value. Examples of key-value stores are Redis and DynamoDB.
Redis: Redis is an open-source, in-memory data structure store, used as a database, cache, and message broker. It supports various types of data structures such as strings, hashes, lists, sets, sorted sets with range queries, bitmaps, hyperloglogs, and geospatial indexes with radius queries.
DynamoDB: Amazon DynamoDB is a key-value and document database that delivers single-digit millisecond performance at any scale. It's a fully managed, multi-region, multi-active, durable database with built-in security, backup and restore, and in-memory caching for internet-scale applications.
Document databases pair each key with a complex data structure known as a document. Documents can contain many different key-value pairs, or key-array pairs, or even nested documents. MongoDB and CouchDB are examples of document databases.
MongoDB: MongoDB is a source-available cross-platform document-oriented database program. Classified as a NoSQL database program, MongoDB uses JSON-like documents with optional schemas. MongoDB is developed by MongoDB Inc.
CouchDB: Apache CouchDB is an open-source document-oriented NoSQL database, implemented in Erlang. CouchDB uses JSON for data storage, JavaScript for MapReduce indexes, and regular HTTP for its API.
Column Stores, also known as wide-column stores, store data in columns instead of rows. This can allow for massive scalability and high performance. Cassandra and HBase are examples of column stores.
Cassandra: Apache Cassandra is a free and open-source, distributed, wide column store, NoSQL database management system designed to handle large amounts of data across many commodity servers, providing high availability with no single point of failure.
HBase: Apache HBase is an open-source, non-relational, distributed database modeled after Google's Bigtable and written in Java. It is developed as part of Apache Software Foundation's Apache Hadoop project and runs on top of HDFS (Hadoop Distributed Filesystem), providing Bigtable-like capabilities for Hadoop.
Graph databases are designed to treat the relationships between data as equally important to the data itself. It's thus intended to hold data without constricting it to a pre-defined model. Instead, the data is stored like we first draw it out - showing how each individual entity connects with or is related to others. Neo4j and Amazon Neptune are examples of graph databases.
Neo4j: Neo4j is a graph database management system developed by Neo4j, Inc. Described by its developers as an ACID-compliant transactional database with native graph storage and processing.
Amazon Neptune: Amazon Neptune is a fully managed graph database by Amazon.com. Neptune supports up to 15 low latency read replicas across three Availability Zones to scale read capacity and execute more than one-hundred thousand graph queries per second.
Each type of NoSQL database has its own specific use case, benefits, and drawbacks. The choice of which to use depends largely on the individual needs of a project.