When we say ‘relational database’ we mean something specific and it involves something called ‘relational algebra’. This is a great way of storing data, it can get complicated but there is a reason we have been using relational databases for a lot of years and we will continue to use them for a lot of years. The genius responsible (and he is one) for this method of storing data is named Edgar Codd.
A non-relational database is literally any other database. Many will use what a lot of us would recognize as a JSON object or Python dictionary for when that might be a better way of storing data. Something like a MongoDB or something. Many will index using shards and the file system, which is different than how you index a relational database.
In a relational database we might have a table with columns “Name”, “Birthdate”, etc. it is essentially excel spreadsheet(s). A nonrelational database might have a key / value pair instead of a column head and row value. A key value pair will look like this;
Fruit:fruit_type:banana
Fruit:fruit_type:apple
If you were to query all fruit types you have to drill down the object to get to the values you want.
Depending on how deep the JSON object goes (so how many colons to get to your desired value) this is a crappy way of getting information. Or, it can be genius, it just depends on your application.
Latest Answers