DEV Community

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

Posted on

4

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

API Trace View

How I Cut 22.3 Seconds Off an API Call with Sentry

Struggling with slow API calls? Dan Mindru walks through how he used Sentry's new Trace View feature to shave off 22.3 seconds from an API call.

Get a practical walkthrough of how to identify bottlenecks, split tasks into multiple parallel tasks, identify slow AI model calls, and more.

Read more →

Top comments (0)

Billboard image

Try REST API Generation for Snowflake

DevOps for Private APIs. Automate the building, securing, and documenting of internal/private REST APIs with built-in enterprise security on bare-metal, VMs, or containers.

  • Auto-generated live APIs mapped from Snowflake database schema
  • Interactive Swagger API documentation
  • Scripting engine to customize your API
  • Built-in role-based access control

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay