What is a Database? Relational Database Design Explained

A database is an organized collection of data that is stored and accessed electronically. While tools like Excel or Word can store small amounts of data, they are not designed for structured, large-scale access.

What is a Database?

A database is any organized collection of data. While a spreadsheet or document can store data, it is not ideal for large-scale or structured access.

For example:

  • Easy: Storing a small list of books in Excel.

  • Difficult: Managing 100,000 books with authors, publishers, and multiple copies using Excel.

What is a Relational Database?

A Relational Database Management System (RDBMS) stores data in tables (also called relations). Each table represents an entity, such as authors or books. These tables are related using keys โ€” typically primary and foreign keys.

Oracle is one of the most widely used RDBMS platforms.

Table Structure in a Relational Database

Table ComponentDescription
TableA collection of related data rows
RowA single record
ColumnA field that defines data type and label
SchemaA collection of tables and objects owned by a user

In Oracle:

  • A user owns a schema.

  • Two users can have tables with the same name because ownership is separate.

Why Use Relational Design?

Consider storing data about books and authors in one table. This causes data repetition if an author wrote multiple books.

Instead, normalize the data:

  • Create a separate AUTHORS table.

  • Link it to the BOOKS table using a foreign key.

ERD (Entity Relationship Diagram)

To understand how relational databases work, let’s look at a simple example with two tables: AUTHORS and BOOKS.

SQL Syntax to Create Tables:

CREATE TABLE authors (
  id         NUMBER PRIMARY KEY,
  first_name VARCHAR2(50),
  last_name  VARCHAR2(50)
);

CREATE TABLE books (
  isbn      CHAR(10) PRIMARY KEY,
  category  VARCHAR2(20),
  title     VARCHAR2(100),
  num_pages NUMBER,
  price     NUMBER,
  copyright NUMBER(4),
  author1   NUMBER CONSTRAINT books_author1
            REFERENCES authors(id)
);

AUTHORS Table

IDFirst NameLast Name
1JohnSmith
2AliceBrown

BOOKS Table

ISBNCategoryTitleNum PagesPriceCopyrightAuthor ID
1001TechMastering PL/SQL35039920231
1002FictionThe Silent Writer28029920222

Example Query: JOIN Authors and Books:

SELECT b.title, a.first_name, a.last_name
FROM authors a, books b
WHERE b.author1 = a.id;

This joins the tables on the author1 foreign key, producing output like:

TitleFirst NameLast Name
Mastering PL/SQLJohnSmith
The Silent WriterAliceBrown

Benefits of Relational Databases

FeatureAdvantage
Redundancy ReductionNo repeated author info for each book
Data IntegrityUses primary and foreign keys
ScalabilityEasy to expand with more entities (e.g., Publisher)
ModularitySeparate logic for each entity (Authors, Books, etc.)

Why Learn Relational Databases?

Relational databases power the backend of most software systems:

  • ERP systems (Oracle, SAP)

  • Websites and eCommerce platforms

  • Mobile applications

  • Financial systems

Understanding relational design is a core skill for developers, database administrators (DBAs), business analysts, and data engineers.

Scroll to Top