PProtokol
Databases and SQL/What a Database Really Is
outline — lesson 1 of 10

Level 1 · Complete beginner · 12 min

What a Database Really Is

A gentle introduction to what databases are and why every real app has one.

What you will learn

  • Define a database in plain English
  • Explain why apps use databases instead of plain files
  • Name the parts of a relational database: tables, rows, columns
  • Recognize SQL as the language used to talk to a relational database

The idea

A database is an organized place to store data so it can be reliably saved, searched, and updated -- even by many people or programs at once. A relational database organizes that data into tables, like labeled grids.

Why does this matter?

A single text file works fine for a to-do list on your own computer. But an app like an online store needs thousands of orders updated every second, searched instantly, and never corrupted -- that needs a real database.

A real-world analogy

Think of a library. Books scattered on the floor are like data in random files: hard to find anything. A library with a catalog, shelves, and sections is like a database: everything has a place, and you can find any book in seconds.

See it in code

A tiny table of users, shown as SQL would return it
SELECT * FROM users;

-- Result:
-- id | name    | email
-- ---+---------+-------------------
-- 1  | Ana     | ana@example.com
-- 2  | Kofi    | kofi@example.com

Line by line

  • SELECT * FROM users;

    SELECT * means "give me every column"; FROM users tells the database which table to read.

  • id | name | email

    Each column has one type of information; every row is one complete record (one user).

What do you think happens?

A table named products has columns id, name, price. What would SELECT * FROM products; return?

Have a guess before you read on. Guessing wrong is part of learning it.

Worth knowing

Common mistake: thinking a database is just "a file that holds data". A real database also enforces rules (like a price cannot be text), lets many users read/write safely at once, and lets you ask precise questions with SQL instead of scanning by eye.

The proper words for it

Database
An organized system for storing, searching, and updating data reliably.
Relational database
A database that stores data in tables made of rows and columns, connected by relationships.
SQL
Structured Query Language -- the language used to ask a relational database questions and change its data.
Table
A named grid of data, like one spreadsheet tab, e.g. users or products.

Where you'll meet this

When you check your bank balance, buy something online, or post on social media, a relational database is almost certainly behind the scenes, storing your account, your order, or your post as rows in tables.

Lesson recap

  • A database stores data reliably so it can be searched and updated safely
  • Relational databases organize data into tables of rows and columns
  • SQL is the language used to read and change data in a relational database
  • Databases add rules and safety that plain files do not have

Still fuzzy on any of this?

That's normal, and it's not a dead end. Pick a different way to hear it.

Quick check

1. What is a relational database?

2. What language do you use to ask a relational database questions or change its data?

3. Why might an app use a database instead of a plain file?

First, pass the quick check to unlock "Tables, Rows, Columns, and Types".

Your tutor

patient by design

No question is too basic here. Ask anything — I'll explain it in plain words and guide you rather than handing over answers.