Databases: SQL vs NoSQL vs NewSQL

Jose Tello V.
𝐀𝐈 𝐦𝐨𝐧𝐤𝐬.𝐢𝐨
5 min readJun 2, 2023
Photo by Tobias Fischer on Unsplash

Database management systems (DBMS) is a comprehensive terminology that refers to a software tool that allows users and applications to store, alter, and retrieve stored data [Fatima and Wasnik, 2016]. There are three classes of database systems, better called relational database systems (RDBMS) based on the relational model proposed by E.F. Codd in 1970 [Codd, 2002], first known as the traditional system.

These systems are commonly referred to as SQL systems, as they use Structured Query Language (SQL) as their primary query language. However, with the advent of the internet and a plethora of internet-connected applications, the amount of data generated has also increased dramatically. To handle large amounts of data effectively: two new kinds of databases were born, non-relational and modern-relational popularly known as NoSQL and NewSQL databases respectively.

(Originally published in Spanish for Linkedin at: 29 Jan, 2023.)

SQL

SQL databases, also known as traditional databases, have been widely used for storing and retrieving large amounts of data since their inception. They are characterized by having a fixed data schema and store the data in the format of rows and columns in a table. Databases that adhere to this class handle concurrency in transactions by preserving ACID properties:

  • Atomicity, a transaction must be complete or not complete.
  • Consistency, coherence in the data.
  • Isolation, Isolate the transactions: one change should not affect other changes that happen at the same time.
  • Durability, the changes are permanent.

Relational databases use a key parameter, such as a primary key, to uniquely identify each row in a table. CRUD (Create, Read, Update, and Delete) are the four main operations used to access data in the database.

Although this model has some drawbacks, it is an efficient and reliable standard model. Some examples of SQL databases are MySQL, Oracle, Access, and Microsoft SQL Server.

NoSQL

What is NoSQL | Redis, https://redis.com/nosql/what-is-nosql/

NoSQL databases, also known as Not-only-SQL databases, have emerged as an alternative to SQL databases due to their flexible schema design, scalability, and ability to handle a variety of data types, making them ideal for storing Big Data and Internet of Things (IoT) data. However, due to their inherently flexible nature, NoSQL databases have their own database taxonomy (see the following table).

The columns stands for: Type of Database and Examples. Source: Self made.

Blockchain-based databases are also worth noting, as they leverage the functionalities and characteristics of both SQL and NoSQL databases, making them an interesting case study.

NewSQL

Dr. Rabi Prasad Padhy, 2018. Google Spanner:A NewSQL Journey or Beginning of the End of the NoSQL Era. https://medium.com/rabiprasadpadhy/google-spanner-a-newsql-journey-or-beginning-of-the-end-of-the-nosql-era-3785be8e5c38

NewSQL, or the modern relational model, is designed in a way that maintains the relational aspect of the traditional RDBMS and at the same time incorporates NoSQL database solutions (scalability and high availability). This model is hailed as the most promising database management system, which is why it is much more adept at handling data than other databases for ever-increasing IoT data. However, NewSQL database systems are not a radical departure from existing system architectures, but rather represent the next chapter in the continuous development of database technologies [Pavlo and Asle, 2016].

Some examples of NewSQL databases are VoltDB, CockroachDB, Google Cloud Spanner, HyPer, and MemSQL.

Conclusions

There is a vast literature that studies the performance (in addition to other parameters) between databases of the same type or SQL versus NoSQL versus NewSQL (some examples will be left in the references).

However, it is widely recognized that the choice of database should depend on the specific requirements of the application and the volume of data to be managed. Although NoSQL databases typically outperform SQL databases in terms of scalability and availability, SQL databases are still preferred when the data schema is fixed and multiple relationships exist in the problem domain. On the other hand, NoSQL databases are suitable when the application requires flexibility, high availability, replication, and scalability, with the caveat that the type of database should be tailored to the application. NewSQL databases maintain ACID properties while providing high availability and scalability, making them ideal for handling very large volumes of data, such as in the case of Big Data.

Bibliographic references

[Bale et al., 2020] Bale, L., Eichmann, P., Angelini, M., Catarci, T., Santucci, G., Zheng, Y., Binnig, C., Fekete, J.-D., y Moritz, D. (2020). Database benchmarking for supporting real-time interactive querying of large data. En Proceedings of the 2020 ACM SIGMOD International Conference on Management of Data, pp. 1571–1587.

[Codd, 2002] Codd, E. F. (2002). A relational model of data for large shared data banks. En Sotfware pioneers, pp. 263–294. Springer.

[Fatima y Wasnik, 2016] Fatima, H. y Wasnik, K. (2016). Comparison of sql, nosql and newsql databases for internet of things. En 2016 IEEE Bombay Section Symposium (IBSS), pp. 1–6. IEEE.

[Győrödi et al., 2015] Győrödi, C., Győrödi, R., Pecherle, G., y Olah, A. (2015). A comparative study: Mongodb vs. mysql. En 2015 13th International Conference on Engineering of Modern Electric Systems (EMES), pp. 1–6. IEEE.

[Murazzo et al., 2019] Murazzo, M., Gómez, P., Rodríguez, N., y Medel, D. (2019). Database newsql performance evaluation for big data in the public cloud. En Conference on Cloud Computing and Big Data, pp. 110–121. Springer.

[Pavlo y Asle, 2016] Pavlo, A. y Asle, M. (2016). What’s really new with newsql? ACM Sigmod Record, 45(2):45–55.

Also, Read

--

--

Jose Tello V.
𝐀𝐈 𝐦𝐨𝐧𝐤𝐬.𝐢𝐨

27, 🇨🇱. Civil Engineer in Computer Science, UTFSM. Engineer at Principal Financial Group. Articles related to software development and technology.