Non Relational Database Example
There can be quite a bit of confusion about non relational databases especially since the term “non relational database” doesn’t really define what it is, but what it isn’t. We’ll quickly cover what a non relational database is and then we’ll go over some of the technologies and how it’s different and consider some of the advantages.
Relational vs. Non Relational Databases
Let’s talk about what a relational database so we can define what a non relational database is.
A relational database structures all it’s data into tables. Each table is like an Excel spreadsheet with rows and columns of data.
Here is an example of a table in a relational database:
Now let’s take a look at how this data might look in a non relational database:
name: "Whole Milk",
name: "Chocolate Bar",
This is the same data but notice that there are no longer rows and columns.
So there are some key differences here. In a non relational database or NOSQL database every entry does not have to have the same keys. So if I wanted to add a new product I could add this with no problem:
name: "New Soda Pop",
Notice that this new item does not have a price, quantity, or department. It was added without those fields. Also it has a new key of “rating” which was not there before. This is a key difference, the relational database relies heavily on a schema that defines the fields beforehand where as non relational databases allow the fields to be different for each record. This adds huge flexibility. The NoSQL non relational databases for this reason are considered to be semi-structured.
One of the reasons you might want to use NoSQL is that it can be easier to store all your data in single record rather than joining several tables together to get the data you need.
Another reason you might use a non relational database is that it’s better at scaling horizontally. Scaling horizontally means that instead of increasing the capacity of a server, you simply add more servers.
Let’s go over some of the common technologies that use each type of database system:
Relational – The most common relational database management systems (RDMBS) or SQL database technologies are: PostgreSQL, MySQL, and Microsoft SQL Server.
Non Relational – The most common non relational database management systems or NoSQL database technologies are: MongoDB, Cassandra, DocumentDB, and Cassandra.
We hope that our explanation and example of a non relational database helped you understand what it is and how it’s very different and has some advantages that make it extremely valuable with today’s technology especially in how it can scale.
If you want some advice on database technology or want to put your existing data in the hands of experts, don’t hesitate to reach out to us at Object Rocket to discuss your situation. Thank you for your time.