Course contentsShow
← Data Science
Lesson 843 of 2,14522. SQL FoundationsFree lesson

Relational Database Concepts

Learning tables, rows, columns, and how relational databases organize data into related structures.

Relational Database Concepts

What you'll learn: How relational databases organize data into structured tables with rows and columns that connect through shared keys.


What Is a Relational Database?

A relational database stores data in tables (also called relations) that can be linked together through common fields. Think of it like a collection of Excel spreadsheets where each sheet represents a different category of information, and you can connect them using matching ID columns.

Core Components

Tables: Each table stores information about one type of entity—customers, products, orders, etc. A customer table holds customer data, a sales table holds transaction data.

Rows (Records): Each row represents a single instance or observation. In a customer table, one row = one customer. This is like a single data point in your dataset.

Columns (Fields/Attributes): Each column represents a specific property or feature. A customer table might have columns for customer_id, name, email, and signup_date.

The "Relational" Part

The power comes from relationships between tables. Instead of storing all information in one massive table, you split it logically and connect tables using keys:

  • Primary Key: A unique identifier for each row (like customer_id)
  • Foreign Key: A column that references the primary key in another table (like customer_id in an orders table)

This structure eliminates data duplication. Rather than repeating customer details in every order record, you store customer info once and reference it by ID.

Why It Matters for Data Science

Before analyzing data, you'll often need to extract and combine information from multiple related tables—a skill that requires understanding these relational structures.

Key Takeaway: Relational databases organize data into connected tables with rows (records) and columns (attributes), using keys to establish relationships and maintain data integrity.