NoSQL Database

Ian Wright
3 min readJan 4, 2021

In my previous article, I covered SQL databases. In this article, I’ll be going over NoSQL databases. When choosing a data base, the main difference is going to be if it’s SQL based or NoSQL based. With NoSQL, any format can be used as long as SQL format is not used. With NoSQL, the most popular database is MongoDB and Redis.

What is NoSQL

NoSQL acronym was created in 1998, and it wasn’t created to copy SQL but it was made to signify it was Not Only SQL, and it’s also not relational. It was created so both technologies can work together and each have its own place. It was designed to distribute large scale data stores for companies like Facebook, which has over 500 million users and Twitter, which uses terabits of data daily. Also with NoSQL there is no-fixed schema and there is a scaling out method that makes it an inexpensive large dataset.

Photo by Pankaj Patel on Unsplash

NoSQL Categories

With NoSQL there are a few categories, some are Key-value Stores, Column Stores, Document Stores and Graph Databases. Starting with Key-value stores, they’re the least complex of the NoSQL databases. It comes from the idea of a hash table where there is a unique key and there is a pointer to a particular item of data. Column Stores were created to store and process very large amounts of data. Usually, relational databases are row-oriented, but not with NoSQL. Column databases store each column separately; it will allows for quicker scans. Column database perform best when analytics and reporting are involved. Document Stores are similar to key-value stores, but it’s a step up in complexity. The documents are stored in formats like JSON. Since documents are designed to store everyday documents as they are, this is the most efficient and natural database. Graph Stores are built with nodes, it’s best used when data is interconnected, like a social media platform. Graphs can become very complex when dealing with large amounts of connected data. Graph data has two main components, Node and Edge.

The difference between SQL and NoSQL

SQL is a relational database while NoSQL is a non-relational database. Between these two databases the language is a big difference, which is relational and non-relational. NoSQL databases are dynamic for unstructured data and a SQL databases use a query language and has a static schema. Also, SQL database is table orientated and with NoSQL database it’s key-value, document, graph or column stores.

The future of NoSQL is bright. Major companies that have data storage needs are making the switch to the more flexible and newer databases. With it not being a relational database, it makes a lot of sense to use a NoSQL database. Many of the NoSQL databases allow a RESTful interface to the data, which is making it very popular. With all that being said, SQL is still widely used and NoSQL is on the rise!

--

--