4 Types of NoSQL Databases
NoSQL databases (aka "not only SQL") are non-tabular, and store data differently than relational tables. NoSQL databases come in a variety of types based on their data model. The main types are document, key-value, wide-column, and graph. They provide flexible schemas and scale easily with large amounts of data and high user loads.
4 major types of NoSQL databases emerged:
Document databases
- Store data in documents similar to JSON (JavaScript Object Notation) objects.
- Each document contains pairs of fields and values.
- The values can typically be a variety of types including things like strings, numbers, booleans, arrays, or objects
- Their structures typically align with objects developers are working within code.
- A powerful query languages
- Horizontally scale-out to accommodate large data volumes.
- MongoDB is consistently ranked as the world’s most popular NoSQL database according to DB-engines and is an example of a document database.
Key-value databases
- A simpler type of database where each item contains keys and values.
- A value can typically only be retrieved by referencing its value.
- Key-value databases are great for use cases where you need to store large amounts of data but you don’t need to perform complex queries to retrieve it.
- Common use cases include storing user preferences or caching.
- Redis and DynanoDB are popular key-value databases.
Wide-column stores
- Store data in tables, rows, and dynamic columns.
- Wide-column stores provide a lot of flexibility over relational databases because each row is not required to have the same columns.
- Many consider wide-column stores to be two-dimensional key-value databases.
- Wide-column stores are great for when you need to store large amounts of data and you can predict what your query patterns will be.
- Wide-column stores are commonly used for storing Internet of Things data and user profile data.
- Cassandra and HBase are two of the most popular wide-column stores.
Graph databases
- Store data in nodes and edges.
- Nodes typically store information about people, places, and things while edges store information about the relationships between the nodes.
- Graph databases excel in use cases where you need to traverse relationships to look for patterns such as social networks, fraud detection, and recommendation engines.
- Neo4j and JanusGraph are examples of graph databases.
- Neo4j is native graph DB which store data in graph format and fully support ACID.
- A database that supports multiple data models.
- Enable users to write in any data model, then read with the same or another data model that it supported.
- Provides benefits in analytics performance and convenience to users.
- Typical multi-model database stores data as Key-Value format and provides efficient read capability in other models.
- ArangoDB is an example of a Multi-Models Database that provides simple GUI to users.
References:
- Multi-model MongoDB https://www.mongodb.com/nosql-explained
- Postgres document and key-value store https://www.enterprisedb.com/nosql-overview
Comments