Table of Contents
NoSQL
Return to SQL, Cloud databases or Database topics
NoSQL Models
NoSQL Models refer to a variety of database systems that do not use the traditional Relational Database Management Systems (RDBMS) approach of tables and structured query language (SQL). Instead, NoSQL databases are designed to handle a wide range of data models, including document-oriented, key-value, column-family, and graph-based models. They are particularly useful for applications requiring flexible schema designs and database scalability.
Core Types of NoSQL Models
- Document Stores: Document-oriented databases store data as documents, typically in JavaScript Object Notation (JSON) or Extensible Markup Language (XML) formats. Each document contains key-value pairs and can be nested. Examples include MongoDB and CouchDB. Document stores are suitable for applications with evolving schemas or semi-structured data.
- Key-Value Stores: Key-value databases store data as pairs of keys and values. Each key is unique and maps to a single value, which can be a simple data type or a more complex data structure. Examples include Redis and Riak. Key-value stores excel in scenarios requiring fast read and write operations.
- Column-Family Stores: Column-family databases organize data into columns rather than rows. Data is stored in tables but accessed by column rather than by row. This model is effective for handling large-scale, distributed data. Examples include Apache Cassandra and HBase. Column-family stores are used in scenarios where write and read performance is crucial.
- Graph Databases: Graph databases focus on storing and querying data as graphs, with nodes, edges, and properties representing data relationships. They are ideal for applications requiring complex relationship traversal, such as social networks or recommendation systems. Examples include Neo4j and ArangoDB.
Advantages of NoSQL Models
- Scalability: NoSQL databases are designed to scale horizontally, meaning they can handle increased load by adding more servers rather than upgrading a single server. This makes them suitable for large-scale applications with high data volume and traffic.
- Flexibility: NoSQL databases support flexible schema designs, allowing for the storage of semi-structured and unstructured data. This adaptability is beneficial for applications with changing data requirements or varying data formats.
- Performance: Many NoSQL databases are optimized for high-performance read and write operations. They often provide features such as caching and in-memory processing to enhance speed and efficiency.
Limitations and Challenges
- Consistency: Some NoSQL models sacrifice strong consistency for improved scalability and availability. This can lead to eventual consistency, where data may not be immediately consistent across all nodes.
- Complex Queries: Unlike relational databases, NoSQL databases may lack advanced querying capabilities. While they support basic queries, complex joins and aggregations may be more challenging to implement.
- Tooling and Support: NoSQL databases may have fewer tools and third-party integrations compared to traditional RDBMSs. This can impact the ease of managing and monitoring databases.
References and Further Reading
Types and examples of NoSQL databases
There have been various approaches to classify NoSQL databases, each with different categories and subcategories, some of which overlap. What follows is a basic classification by data model, with examples:
- Key-value: Aerospike, Apache Ignite, ArangoDB, Berkeley DB, Couchbase, Dynamo, FairCom c-treeACE, FoundationDB, InfinityDB, MemcacheDB, MUMPS, Oracle NoSQL Database, OrientDB, Redis, Riak, SciDB, SDBM/Flat File dbm, ZooKeeper
Database Navbar
Related Topics:
Detailed Classification
A more detailed classification is the following, based on one from Stephen Yen:<ref>
</ref><ref>
</ref>
Type | Notable examples of this type |
---|---|
Key-Value Cache | Apache Ignite, Coherence, eXtreme Scale, Hazelcast, Infinispan, Memcached, Velocity |
Key-Value Store | ArangoDB, Aerospike |
Key-Value Store (Eventually-Consistent) | Oracle NoSQL Database, Dynamo, Riak, Voldemort |
Key-Value Store (Ordered) | FoundationDB, InfinityDB, LMDB, MemcacheDB |
Data-Structures Server | Redis |
Tuple Store | Apache River, GigaSpaces |
Object Database | Objectivity/DB, Perst, ZopeDB |
Document Store | ArangoDB, BaseX, Clusterpoint, Couchbase, CouchDB, DocumentDB, IBM Domino, MarkLogic, MongoDB, Qizx, RethinkDB |
Wide Column Store | Amazon DynamoDB, Bigtable, Cassandra, Druid, HBase, Hypertable |
Native Multi-model Database | ArangoDB, Cosmos DB, OrientDB |
Correlation databases are model-independent, and instead of row-based or column-based storage, use value-based storage.
Key-value store
Key-value (KV) stores use the associative array (also known as a map or dictionary) as their fundamental data model. In this model, data is represented as a collection of key-value pairs, such that each possible key appears at most once in the collection.<ref>
</ref><ref>
</ref>
The key-value model is one of the simplest non-trivial data models, and richer data models are often implemented as an extension of it. The key-value model can be extended to a discretely ordered model that maintains keys in lexicographic order. This extension is computationally powerful, in that it can efficiently retrieve selective key ranges.<ref>
</ref>
Key-value stores can use consistency models ranging from eventual consistency to serializability. Some databases support ordering of keys. There are various hardware implementations, and some users maintain data in memory (RAM), while others employ solid-state drives (SSD) or rotating disks (aka Hard Disk Drive (HDD)).
Document store
The central concept of a document store is the notion of a “document”. While each document-oriented database implementation differs on the details of this definition, in general, they all assume that documents encapsulate and encode data (or information) in some standard formats or encodings. Encodings in use include XML, YAML, and JSON as well as binary forms like BSON. Documents are addressed in the database via a unique key that represents that document. One of the other defining characteristics of a document-oriented database is that in addition to the key lookup performed by a key-value store, the database also offers an API or query language that retrieves documents based on their contents.
Different implementations offer different ways of organizing and/or grouping documents:
- Collections
- Tags
- Non-visible metadata
- Directory hierarchies
Compared to relational databases, for example, collections could be considered analogous to tables and documents analogous to records. But they are different: every record in a table has the same sequence of fields, while documents in a collection may have fields that are completely different.
Graph
Main: Graph database
This kind of database is designed for data whose relations are well represented as a graph consisting of elements interconnected with a finite number of relations between them. The type of data could be social relations, public transport links, road maps, network topologies, etc.
; Graph databases and their query language
Object database
Tabular
Tuple store
- TIBCO ActiveSpaces
Triple/quad store (RDF) database
- Apache JENA (It is a framework, not a database)
Hosted
Multivalue databases
- Extensible Storage Engine (ESE/NT)
- jBASE Pick database
- mvBase Rocket Software
- mvEnterprise Rocket Software
- Northgate Information Solutions Reality, the original Pick/MV Database
- Revelation Software's OpenInsight
- UniData Rocket U2
- UniVerse Rocket U2
Multimodel database
Return to GitHub star ranking for organizations, GitHub star ranking for repositories, GitOps or GitHub
- Snippet from Wikipedia: NoSQL
NoSQL (originally referring to "non-SQL" or "non-relational") is an approach to database design that focuses on providing a mechanism for storage and retrieval of data that is modeled in means other than the tabular relations used in relational databases. Instead of the typical tabular structure of a relational database, NoSQL databases house data within one data structure. Since this non-relational database design does not require a schema, it offers rapid scalability to manage large and typically unstructured data sets. NoSQL systems are also sometimes called "Not only SQL" to emphasize that they may support SQL-like query languages or sit alongside SQL databases in polyglot-persistent architectures.
Non-relational databases have existed since the late 1960s, but the name "NoSQL" was only coined in the early 2000s, triggered by the needs of Web 2.0 companies. NoSQL databases are increasingly used in big data and real-time web applications.
Motivations for this approach include simplicity of design, simpler "horizontal" scaling to clusters of machines (which is a problem for relational databases), finer control over availability, and limiting the object-relational impedance mismatch. The data structures used by NoSQL databases (e.g. key–value pair, wide column, graph, or document) are different from those used by default in relational databases, making some operations faster in NoSQL. The particular suitability of a given NoSQL database depends on the problem it must solve. Sometimes the data structures used by NoSQL databases are also viewed as "more flexible" than relational database tables.
Many NoSQL stores compromise consistency (in the sense of the CAP theorem) in favor of availability, partition tolerance, and speed. Barriers to the greater adoption of NoSQL stores include the use of low-level query languages (instead of SQL, for instance), lack of ability to perform ad hoc joins across tables, lack of standardized interfaces, and huge previous investments in existing relational databases. Most NoSQL stores lack true ACID transactions, although a few databases have made them central to their designs.
Instead, most NoSQL databases offer a concept of "eventual consistency", in which database changes are propagated to all nodes "eventually" (typically within milliseconds), so queries for data might not return updated data immediately or might result in reading data that is not accurate, a problem known as stale read. Additionally, some NoSQL systems may exhibit lost writes and other forms of data loss. Some NoSQL systems provide concepts such as write-ahead logging to avoid data loss. For distributed transaction processing across multiple databases, data consistency is an even bigger challenge that is difficult for both NoSQL and relational databases. Relational databases "do not allow referential integrity constraints to span databases". Few systems maintain both ACID transactions and X/Open XA standards for distributed transaction processing. Interactive relational databases share conformational relay analysis techniques as a common feature. Limitations within the interface environment are overcome using semantic virtualization protocols, such that NoSQL services are accessible to most operating systems.
YouTube Videos
Cloud Monk recommends the following YouTube video:
GitHub Tags
External Sites
Main
- nosql
Interesting Articles
Support Resources, FAQs, Q&A, Docs, Blogs
Search Engines
Repos and Registries
Package Managers Artifact Registries and Repos:
- https://hub.docker.com/search?q=nosql &type=image - Docker Hub Search