NoSQL databases: Document Stores

The use of non-relational databases, commonly referred to as NoSQL databases, emerged in the mid 1990s with the advent of the internet and the subsequent proliferation of non-homogeneous data (Foote, 2018).

One type of NoSQL database is a document store, sometimes called a document-oriented database. Document stores are designed for the storage of semi-structured data, giving them the ability to store many types of data, including arrays and objects, in a single document.

An individual record on the database is stored as a document, often kept in the human readable JSON format. This contains all of the information for that item in the same place, rather than being spread across multiple tables. Similar documents are kept together in a collection, which can be regarded as similar in function to the table of a relational database. Many collections together make a database (MongoDB, N.D.).

There are many stated advantages to using a document-oriented database over a relational database. Firstly, as the data in document-oriented databases is stored in JSON documents using key-value pairs, it maps more readily to the kind of data structures used by developers, decreasing development complexity. Additionally, a document may contain different fields to other documents in the collection. The lack of a structured table with a defined number of fields increases its ability to deal with non-regular, non-structured data. A further advantage of NoSQL databases is that normalization of the data, and hence the use of JOINS needed to build relationships between data spread across tables, is not required (Foote, 2016).

In addition to superior flexibility and agility, document stores have also been found to be more efficient than traditional SQL databases in performing simple repeated CRUD operations on the data. One such study comparing three popular SQL databases and three NoSQL databases found that the NoSQL database MongoDB was the fastest when it came to retrieving data from the database. Truica et. al (2018: 5) states that “overall, the NoSQL databases perform better than the relational ones”. A similar study by Reetishwaree and Hurbungs found MongoDB to be more performant when writing to the database, but that relational databases enjoyed a time advantage when only reading from the database (Reetishwaree and V. Hurbungs, 2020).

In conclusion, it seems that as the data we gather and process diversifies, the need for non-relational databases and the advantages they have when dealing with non-homogeneous data will only continue to increase.

References

Foote, K. D. (2016) A Review of Different Database Types: Relational versus Non-Relational. Available from: http://www.dataversity.net/review-pros-cons-different-databases-relational-versus-non-relational/ [Accessed 23 October 2021]

Foote, K .D. (2018) A Brief History of Non-Relational Databases. Available from: https://www.dataversity.net/a-brief-history-of-non-relational-databases/ [Accessed 23 October 2021]

MongoDB (N.D.) “What is a document database?” Available from: https://www.mongodb.com/document-databases [Accessed 23 October 2021]

Reetishwaree, S. & Hurbungs, V. (2020) Evaluating the performance of SQL and NoSQL databases in an IoT environment. 2020 3rd International Conference on Emerging Trends in Electrical, Electronic and Communications Engineering (ELECOM), pp. 229-234, doi: 10.1109/ELECOM49001.2020.9297028.

Truica, C., Radulescu, F., Boicea, A. & Bucur, I. (2015) Performance Evaluation for CRUD Operations in Asynchronously Replicated Document Oriented Database. 2015 20th International Conference on Control Systems and Computer Science, pp. 191-196, doi: 10.1109/CSCS.2015.32.


Personal Project 1

Etch-a-Sketch: A single page web application written in HTML, CSS and Javascript.

Marketplace

Marketplace: An e-commerce web application written in Python using the Flask framework.