TechTarget.com/searchdatamanagement

https://www.techtarget.com/searchdatamanagement/definition/NoSQL-Not-Only-SQL

What is NoSQL (Not Only SQL database)?

By Kinza Yasar

NoSQL is an approach to database management that can accommodate a wide variety of data models, including document, graph, key-value and columnar formats.

A NoSQL database generally means that it's non-relational, distributed, flexible and scalable. Additional common NoSQL database features include the lack of a tabular database schema, data clustering, replication support and eventual consistency, as opposed to the typical ACID (atomicity, consistency, isolation and durability) transaction properties of relational and structured query language (SQL) databases. Many NoSQL database systems are also open source.

The term NoSQL originally could be taken at its word -- that is, SQL wasn't used as the application programming interface (API) to access data. However, the ubiquity and usefulness of SQL caused many NoSQL databases to add support for SQL. Today, it's commonly accepted that NoSQL stands for "not only SQL."

What are the types of NoSQL databases?

There are four types of NoSQL database systems. Each uses a different type of data model, resulting in significant differences between each NoSQL type, noted as follows:

These basic NoSQL database classifications are only guides. Over time, vendors have mixed and matched elements from different NoSQL database families to achieve more generally useful systems. That evolution is seen, for example, in MarkLogic from Progress Software, which added a graph store and other elements to its original document databases. Couchbase Server supports both key-value and document approaches. Apache Cassandra has combined key-value elements with a wide-column store and a graph database. Sometimes NoSQL elements are mixed with SQL elements, creating a variety of databases that are referred to as multimodel databases.

Advantages of NoSQL

There are several advantages to using NoSQL databases, including the following:

Disadvantages of NoSQL

Disadvantages of using a NoSQL database include the following:

NoSQL vs. SQL: What's the difference?

At a high level, SQL databases are general purpose, whereas NoSQL databases are engineered for specific use cases. The primary differences between NoSQL and SQL can be summed up in the following five categories. Each deploys a different approach to these aspects of data storage and retrieval.

  1. API. For NoSQL, SQL isn't required as an API to the data in the database, although many NoSQL databases offer a SQL-like query language. For SQL databases, SQL is typically the only, or predominant, interface to the data.
  2. Data model. With NoSQL database systems, data isn't modeled as tables with fixed rows and columns, as with a SQL DBMS. Instead, depending on the NoSQL database, data can be modeled as JSON documents, graphs with nodes and edges, or key-value pairs. Wide-column stores use the table and row concept, but columns can be dynamic from row to row within a table.
  3. Schema. The schema for a NoSQL database is flexible, meaning there's no fixed structure to the data, data types and lengths for data elements. Data can be stored in a free-form, or schemaless, manner. This approach offers programmers a higher degree of flexibility, which can ease development efforts. With SQL databases, the schema is fixed, with rigid data types and lengths for each column, and every row must match the defined column layout and structure. For example, if a column is defined as an integer, only integer data can be stored in the column and the DBMS will reject any attempt to do otherwise. This approach delivers better data quality because the DBMS enforces rules as data is added.
  4. Scalability. NoSQL databases usually execute horizontal scaling, also known as scaling out. Scaling out involves adding more hardware to a system, usually in the form of new commodity servers. Horizontal partitioning using sharding is frequently used in NoSQL systems to break large databases into smaller pieces spread across multiple servers. The SQL approach typically is vertical scaling, also referred to as scaling up. With vertical scaling, additional resources are added -- such as a more powerful CPU or additional memory -- to handle additional workload or to improve performance.
  5. Data integrity. NoSQL and SQL databases use different approaches to protect the integrity of data as it's created, read, updated and deleted by applications and users. Most NoSQL database systems manage data integrity with an approach known as BASE (Basically Available, Soft State with Eventual Consistency). Using BASE, data can stay inconsistent for some time, but database replication eventually updates all copies of the data to be consistent. Some applications can tolerate this type of inconsistent data, whereas others can't.

SQL databases use the ACID approach, which NoSQL databases don't follow. Each of its four qualities -- atomicity, consistency, isolation and durability -- contribute to the ability of a transaction to ensure data integrity in SQL databases. Using ACID, each transaction -- when executed alone, in a consistent database state -- either completes, producing correct results, or terminates, with no effect. In either case, the resulting condition of the database always will be a consistent state.

NoSQL vs. RDBMS

NoSQL and relational database management systems (RDBMSes) are different database systems, each having their own strengths and weaknesses. The major differences between the two include the following:

Evolution of NoSQL

SQL and relational database systems are pervasive because they deliver a general-purpose mechanism for supporting most data management requirements. They're designed to be reliable, accurate and useful for planned applications as well as ad hoc and complex queries. Nevertheless, some SQL and relational requirements -- for example, rigid schema and strict ACID -- can make them less suitable for applications that require flexible data and high speed.

NoSQL database systems arose to address these needs, many developed by companies such as Amazon with its DynamoDB, Meta and its Apache Cassandra, and Google with its Bigtable database to address their specific needs. Another early influential NoSQL database system is Berkeley DB, developed at the University of California, Berkeley, beginning in the 1990s. Berkeley DB is described as an embedded database that closely supports specific applications' storage needs. This open source software provides a simple key-value store. Berkeley DB was commercially released by Sleepycat Software in 1999. The company was acquired by Oracle in 2006. Oracle continues to support open source Berkeley DB.

The NoSQL term can be applied to some databases that predated the RDBMS, but it more commonly refers to the databases built in the early 2000s for the purpose of large-scale database clustering in cloud and web applications.

NoSQL databases are becoming more common in cloud computing settings. Examine the wide range of NoSQL database options in the cloud that leading providers and other vendors offer.

13 Sep 2024

All Rights Reserved, Copyright 2005 - 2025, TechTarget | Read our Privacy Statement