What are NoSQL Databases?
A NoSQL originally referring to non-SQL or
non-relational is a database that provides a mechanism for storage and
retrieval of data. This data is modelled in means other than the tabular
relations used in relational databases. Such databases came into existence in
the late 1960s, but did not obtain the NoSQL moniker until a surge of
popularity in the early twenty-first century. NoSQL databases are used in
real-time web applications and big data and their use are increasing over time.
NoSQL systems are also sometimes called Not only SQL to emphasize the fact that
they may support SQL-like query languages.
A NoSQL database includes simplicity of
design, simpler horizontal scaling to clusters of machines and finer control
over availability. The data structures used by NoSQL databases are different
from those used by default in relational databases which makes some operations
faster in NoSQL. The suitability of a given NoSQL database depends on the
problem it should solve. Data structures used by NoSQL databases are sometimes
also viewed as more flexible than relational database tables.
Many NoSQL stores compromise consistency
in favour of availability, speed and partition tolerance. Barriers to the
greater adoption of NoSQL stores include the use of low-level query languages,
lack of standardized interfaces, and huge previous investments in existing
relational databases. Most NoSQL stores lack true ACID (Atomicity, Consistency,
Isolation, Durability) transactions but a few databases, such as MarkLogic,
Aerospike, FairCom c-treeACE, Google Spanner (though technically a NewSQL
database), Symas LMDB, and OrientDB have made them central to their designs.
Most NoSQL databases offer a concept of
eventual consistency in which database changes are propagated to all nodes so
queries for data might not return updated data immediately or might result in
reading data that is not accurate which is a problem known as stale reads. Also
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. This is difficult for both NoSQL and
relational databases. Even current relational databases do not allow
referential integrity constraints to span databases. There are few systems that
maintain both X/Open XA standards and ACID transactions for distributed
transaction processing.