DEV Community

Cover image for Relational VS Non Relational Databases
Angelica Lo Duca
Angelica Lo Duca

Posted on

Relational VS Non Relational Databases

Choosing the right database for storing your data is not always an easy choice. In fact, if in the first instance, the use of a relational database might seem more natural, in some cases this choice may not be successful.
In this article I try to describe the differences between relational and non-relational databases, trying to highlight their pros and cons.

1 Relational Databases

A Relational Database is a collection of items with pre-established relationships among them. All the items are organised in tables, where columns represent items attributes. Every row of a table represents a single data item.
In order to identify each item in a table uniquely, a primary key should be defined for each table. A primary key could contain one or more columns of a table. Multiple tables could be related through different foreign keys.
A Relational Database could be queried in different ways, without altering the tables structures. The Structured Query Language (SQL) is the most famous interface used to communicate with a Relational Database.
Examples of SQL database engine are:

  • Mysql
  • Postgres
  • Microsoft SQL Server
  • SQLlite.

Summarising, in a Relational Database all the information is structured, i.e. it is organised in tables.

1.1 Pros of Relational Databases

Great for structured data
Use of an existing query language (SQL)
Great for complex queries
Easy data navigation
High level of data integration, due to relationships and constraints among tables
Transactions are secure
High reliability

1.2 Cons of Relational Databases

Up-front schema definition
No adaptation to changing requirements: dynamic changes to an item affect all the other items in the same table
Data processing may be slow. High performance is possible with expensive hardware

https://towardsdatascience.com/relational-vs-non-relational-databases-f2ac792482e3

Top comments (0)