A Six-Part Beginner Course on What a Database Is
This is a written course outline you can follow on your own, at your own speed. There is nothing to buy, no enrolment and no certificate. Each part has one goal, a short reading and a small task. Plan about one evening per part.
Before you start
Install a tool that lets you type SQL and see results. SQLite with a simple browser-style app (such as DB Browser for SQLite) is a gentle choice, because the whole database is one file you can delete and recreate. Everything in this course works there.
The six parts
| Part | Goal | Task |
|---|---|---|
| 1. Why databases exist | Explain what a database does that a file or spreadsheet does not | Write three sentences in your own words |
| 2. Tables, rows and columns | Describe data as tables | Sketch a table for your music or book collection on paper |
| 3. Your first SQL | Create a table, add rows and read them back | Run CREATE TABLE, INSERT and SELECT |
| 4. Keys | Give every row an identity and link tables | Add an id primary key and a second table that points to it |
| 5. How apps connect | Understand drivers and connection strings | Read a connection string and name every part |
| 6. Staying safe | Avoid SQL injection and protect data | Rewrite an unsafe query with placeholders |
Readings for each part
- Our follow-up questions on what a database is.
- Our practice unit on tables, rows and columns.
- The "getting started" section of the SQLite documentation, or our beginner SELECT modules in SELECT queries in five short modules.
- Our picture guide to keys linking two tables.
- Our walkthrough of a connection string, piece by piece, and how an app talks to a database, in pictures.
- Our hands-on SQL injection exercise.
A small example to carry through the course
Use one example the whole way, so each part builds on the last. A good one is a tiny library:
CREATE TABLE books (
id INTEGER PRIMARY KEY,
title TEXT NOT NULL,
author TEXT
);
INSERT INTO books (title, author) VALUES ('Gardens', 'Ada');
SELECT * FROM books;
In part 4 you will move author into its own table. In part 6 you will query it safely from a short program.
Tips for learning on your own
Type, do not paste. Typing SQL yourself makes the words stick much faster.
Break things on purpose. Leave out a comma, insert a row without a title, use a wrong table name. Reading error messages is a skill, and practice files are the place to learn it.
Keep a notes file. Write down each new word (row, column, primary key, query) with your own one-line definition.
Go slowly. One concept per evening is plenty. If a part feels hard, repeat it before moving on.
When you finish
You will be able to explain what a database is, create and query small tables, and connect to one from code safely. The natural next step is the course outline on primary keys, then joins.
A free learning page for beginners. Practise on a test database, never on real customer data, and check the official documentation for your database version.
This page is a free outline. No downloadable files, paid content, courses or certificates are offered on this site.