What Is a Relational Database?

Updated

A relational database is a way of structuring data into tables made of rows and columns. A table usually has a defined schema, and relationships between rows in different tables are commonly represented with keys.

In this context, a relationship is a logical connection between records, often where a foreign key in one table refers to a primary or unique key in another.

Some examples are:

  • One to many → One case can have many users assigned to it.
  • Many to many → Many mediators can work on many cases. A junction table normally represents this.
  • One to one → One user can have one profile record (when the schema enforces that uniqueness).

“Relational” does not mean every possible relationship must be declared in advance, but constraints are one of the main ways a database can protect the integrity of those connections.