NoSQL database
Overview
A NoSQL (originally referring to "non-SQL" or "non-relational") database provides a mechanism for storage and retrieval of data that is modeled in means other than the tabular relations used in relational databases. Such databases have existed since the late 1960s, but the name "NoSQL" was only coined in the early 21st century, triggered by the needs of Web 2.0 companies such as Facebook, Google, and Amazon.com.
Types of NoSQL Databases
There are four main types of NoSQL databases: document-oriented, key-value, wide-column, and graph. Each type solves a problem that can’t be solved with relational databases.
Document-oriented
A document-oriented database is designed to store, retrieve, and manage document-oriented information, also known as semi-structured data. Document-oriented databases are one of the main categories of NoSQL databases, and the popularity of the term "document-oriented database" has grown with the use of the term NoSQL itself.
Key-Value
Key-value databases are the simplest in design and are the most flexible for scaling out. The key-value part refers to the fact that the database stores data as a collection of key-value pairs. This is a simple method to store data, and it is known to scale well.
Wide-Column
A wide-column store is a type of NoSQL database. It uses tables, rows, and columns, but unlike a relational database, the names and format of the columns can vary from row to row in the same table.
Graph
Graph databases are a type of NoSQL database, created to address the limitations of relational databases. While the graph model explicitly lays out the dependencies between nodes of data, the relational model and other NoSQL database models link the data by implicit connections.
Advantages of NoSQL Databases
NoSQL databases are increasingly used in big data and real-time web applications. NoSQL systems are also sometimes called "Not only SQL" to emphasize that they may also support SQL-like query languages.
Scalability
NoSQL databases are typically more scalable and provide superior performance, and their data model addresses several issues that the relational model is not designed to address. Large scale web applications like Google, Facebook, Amazon, etc. use NoSQL databases to handle large volumes of data.
Flexibility
The flexible, semi-structured, and hierarchical nature of documents and wide columns can make them easier to work with because it is more intuitive and closer to the programming models for objects, which can be nested.
Speed
NoSQL databases are often faster than relational databases because their data models are simpler.
Disadvantages of NoSQL Databases
While NoSQL databases have many advantages, they are not suitable for all types of data.
Lack of Standardization
There is a lack of universal standards or protocols for NoSQL databases, unlike SQL databases, which have a well-defined standard language.
Limited Query Capabilities
NoSQL databases do not have a standard interface or query language, and their query languages are not as powerful as SQL.
Use Cases
NoSQL databases are often used in big data and real-time web applications. They are also used where scalability and speed are more important than consistency and transactions, and where a flexible schema is desirable.