Skip to main content

What is a relational database?

A relational database (RDB) is a type of database where information is stored as tables, and relationships between data are expressed through shared fields. The core idea is that data is organized in a structured, interconnected way, so it can be efficiently searched, updated, and analyzed.

Key points

  1. Tables (relations): data is stored in tables, every row is a record (e.g. an employee), every column is a field (e.g. name, age).
  2. Relationships between tables: tables can be linked through shared fields (keys). For example, an "Employees" table and a "Departments" table are linked through a DepartmentID field.
  3. Uniqueness of data: every table usually has a primary key, a unique identifier for every record.
  4. SQL: relational databases use SQL to work with tables, run queries, and manage the relationships between them.

Example:

  • The Employees table: ID, Name, DepartmentID
  • The Departments table: ID, Name The link through DepartmentID lets you find out which department each employee works in.

Put simply, a relational database is like a well-organized spreadsheet with several sheets, where data between sheets is linked and complex queries can be run to find the information you need.

Short Answer

Interview ready
Premium

A concise answer to help you respond confidently on this topic during an interview.