FazBrowse Wikipedia Viewer | Main Page |
Search Wikipedia:
|
Viewing: https://en.wikipedia.org/wiki/NoSQL

NoSQL

Contents
    Document store
Query optimization and indexing in NoSQL databases
See also
References
Further reading

NoSQL (a colloquial title that became formal, meaning "not only SQL" or "non-relational") refers to a type of database design that stores and retrieves data differently from the traditional table-based structure of relational databases. Unlike relational databases, which organize data into rows and columns like a spreadsheet, NoSQL databases use a single data structure—such as key–value pairs, wide columns, graphs, or documents—to hold information. Since this non-relational design does not require a fixed schema, it scales easily to manage large, often unstructured datasets. NoSQL systems are sometimes called "Not only SQL" because they can support SQL-like query languages or work alongside SQL databases in polyglot-persistent setups, where multiple database types are combined. Non-relational databases date back to the late 1960s, but the term "NoSQL" emerged in the early 2000s, spurred by the needs of Web 2.0 companies like social media platforms.

NoSQL databases are popular in big data and real-time web applications due to their simple design, ability to scale across clusters of machines (called horizontal scaling), and precise control over data availability. These structures can speed up certain tasks and are often considered more adaptable than fixed database tables. However, many NoSQL systems prioritize speed and availability over strict consistency (per the CAP theorem), using eventual consistency—where updates reach all nodes eventually, typically within milliseconds, but may cause brief delays in accessing the latest data, known as stale reads. While most lack full ACID transaction support, some, like MongoDB, include it as a key feature.

Key–value (KV) stores use the associative array (also called 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.

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.

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 store data in memory (RAM), while others on solid-state drives (SSD) or rotating disks (aka hard disk drive (HDD)).

Document store

edit
No AgensGraphYesYes Amazon DynamoDBYesYes IBM Db2YesNo MarkLogicYes{{cite web|url=https://docs.mongodb.com/manual/reference/operator/aggregation/lookup/#sharded-collection-restrictions |title=Sharded Collection Restrictions |website=docs.mongodb.com |access-date=2020-01-24}}</ref>}}"]}'>Yes OrientDB
  1. ↑ Joins do not necessarily apply to document databases, but MarkLogic can do joins using semantics.
  2. ↑ MongoDB did not support joining from a sharded collection until version 5.1.
  3. ↑ OrientDB can resolve 1:1 joins using links by storing direct links to foreign records.

Query optimization and indexing in NoSQL databases

edit

Different NoSQL databases, such as DynamoDB, MongoDB, Cassandra, Couchbase, HBase, and Redis, exhibit varying behaviors when querying non-indexed fields. Many perform full-table or collection scans for such queries, applying filtering operations after retrieving data. However, modern NoSQL databases often incorporate advanced features to optimize query performance. For example, MongoDB supports compound indexes and query-optimization strategies, Cassandra offers secondary indexes and materialized views, and Redis employs custom indexing mechanisms tailored to specific use cases. Systems like Elasticsearch use inverted indexes for efficient text-based searches, but they can still require full scans for non-indexed fields. This behavior reflects the design focus of many NoSQL systems on scalability and efficient key-based operations rather than optimized querying for arbitrary fields. Consequently, while these databases excel at basic CRUD operations and key-based lookups, their suitability for complex queries involving joins or non-indexed filtering varies depending on the database type—document, key–value, wide-column, or graph—and the specific implementation.

See also

edit

References

edit
  • ↑ https://nosql-database.org/ "NoSQL DEFINITION: Next Generation Databases mostly addressing some of the points : being non-relational, distributed, open-source and horizontally scalable".
  • ↑ "What Is a NoSQL Database? | IBM". www.ibm.com. 12 December 2022. Retrieved 9 August 2024.
  • ↑ Mohan, C. (2013). History Repeats Itself: Sensible and NonsenSQL Aspects of the NoSQL Hoopla (PDF). Proc. 16th Int'l Conf. on Extending Database Technology.
  • ↑ "RDBMS dominate the database market, but NoSQL systems are catching up". DB-Engines.com. 21 November 2013. Archived from the original on 24 November 2013. Retrieved 24 November 2013.
  • ↑ "MongoDB ACID Transactions". GeeksforGeeks. 12 March 2024. Retrieved 25 October 2024.
  • ↑ Fowler, Adam. "10 NoSQL Misconceptions". Dummies.com. Retrieved 6 March 2017.
  • ↑ Lawrence, Integration and virtualization of relational SQL and NoSQL systems including MySQL and MongoDB (2014). "Integration and virtualization of relational SQL and NoSQL systems including MySQL and MongoDB". International Conference on Computational Science and Computational Intelligence 1.
  • ↑ "NoSQL 2009". Blog.sym-link.com. 12 May 2009. Archived from the original on 16 July 2011. Retrieved 29 March 2010.
  • ↑ "TerminusDB an open-source in-memory document graph database". terminusdb.com. Retrieved 16 December 2021.
  • ↑ "Can't do joins with MarkLogic? It's just a matter of Semantics! - General Networks". Gennet.com. Archived from the original on 3 March 2017. Retrieved 6 March 2017.
  • ↑ Sullivan, Dan. NoSQL for Mere Mortals. ISBN 978-0134023212.
  • Further reading

    edit
    Database management systems
    Types
    Concepts
    Objects
    Components
    Functions
    Related topics

    View original on Wikipedia | Back | FazBrowse Home