DEV Community

Cover image for Relational Database
Nathalia Friederichs
Nathalia Friederichs

Posted on

Relational Database

In this article, we will cover the relational database. What it is, how it works, and what are the main relational database management systems.

Brief History

The relational database was created in the 1970s at IBM to address certain problems that existed before, such as difficulties in data access, inconsistency, redundancy and lack of security.

What Is It?

In a relational database, data is stored in tables that can establish relationships with each other. This format is chosen when the application we are developing requires both consistency, ensuring that everyone shares the same data, and integrity, avoiding data loss or corruption.

Tables within a relational database consist of columns and rows. Each column represents an attribute associated with an entity, such as "name," while each row contains a specific instance of that entity, for example, a person. In the figure below, we present an illustrative example of a table.

Image description

In tables within a relational database, there is always a primary key, which is unique. This key is unique because it is used to identify a row. In the image below, we have an example of a table where the ID is the primary key.

Image description

We also have the foreign key, which is a unique key that references the primary key. It is with these two keys that we establish relationships between tables.

Here, we have two tables that relate to the ID key.

Image description

Characteristics of Relational Databases

  • Highly structured
  • Various entities
  • Less redundancy
  • Represented using a logical and physical schema
  • Use of the standard query language SQL (Structured Query Language)

SQL

In SQL, we have Data Definition Language (DDL), which is the integrated language for creating tables, and Data Manipulation Language (DML), which is the language for manipulating data.

Main Relational Database Management Systems

To control storage, security, ensure integrity, and manipulate data, we use software called Database Management Systems (DBMS). The main DBMSs available in the market are:

  • Microsoft Azure SQL Database
  • Microsoft SQL Server
  • MySQL
  • Oracle Database
  • PostgreSQL
  • SQLite
  • MariaDB
  • Hive

Top comments (1)

Collapse
 
realsteveig profile image
STEVE

Insightful!!