When should you consider using a NoSQL database (rather than a relational database)?

We have been working with SQL relational databases for 40 years: they are ideal for processing transactions involving tabular data stored in columns and rows. We can also analyze this data very effectively in multidimensional databases.

Data that is suitable for relational tables is atomic. It simply means that they can be subdivided down to the smallest manipulable components.

For example, we rarely store the full name of a customer in the same field. When we enter the data of the client “Mr. Jacques Lemasson” in a relational database, if we wish to be able to isolate all the persons with the title “Mr.” and to classify the clients in alphabetical order according to their surname and their first name we need to store the name data in three different columns of a table.

Today, much of the data collected does not fit into this table model: images, data recorded by sensors, Word documents, Twitter feeds and other data often called Big Data .

And even if we sometimes put these data in tables, it is not necessarily effective.

One could imagine storing each pixel of an image in a separate line of a relational table. But then you have to ask yourself the following question: which SQL code to write to determine if the image includes a person?
I do not even want to imagine for a single second what this code might look like.

The good news is that we now have dedicated database engines designed to conserve and manage Big Data: NoSQL databases.

Relational databases require us to use data schemas. Imagine that this schema is a way of classifying the data. In relational databases, you need to segment these data into atomic units, and then organize them into tables as columns and rows.

There are different types of NoSQL databases , so any over-generalization would be misleading. But overall, they require only a very simple schema, if any.

For example, some NoSQL database systems allow you to save image files directly into the database without altering the structure of the database. One could also store audio files in the same database.

It becomes much simpler to place data in the database and we gain flexibility since the data structure is not fixed.

In conclusion, if your data are difficult to store in tabular form or searchable in SQL, look at the NoSQL side.

Leave a Reply

Your email address will not be published. Required fields are marked *