Reading Path: From Zero to Your First Database-Backed App

This path links pages already on DatabaseIntegrate.org in the order that works best for a complete beginner. Each step says why it is there. Take your time: one or two pages a day is a comfortable pace.

Stage 1: understand what you are working with

  1. Beginner follow-up questions: what exactly is a database? Start here to clear up the difference between a database, a spreadsheet and a plain file.
  2. Practice unit: tables, rows and columns. The three words you will use every day from now on, with a small exercise on paper and in SQL.
  3. A plain guide to relational and NoSQL databases. So you know which kind this path teaches and why.

Stage 2: write your first SQL

  1. How to create your first SQLite database and table. Gets a working practice database onto your computer in a few minutes.
  2. SELECT queries in five short beginner modules. Reading data is what you will do most, so it comes first.
  3. Chaptered walkthrough: CRUD with a tiny to-do list. Adds creating, changing and deleting rows to what you know.

Stage 3: connect tables together

  1. Practice session: picking a good primary key. Every table needs one; this builds the habit.
  2. A picture guide to keys linking two tables. Shows how one table points to another.
  3. INNER JOIN and LEFT JOIN, one small step at a time. How to read data from two linked tables at once.

Stage 4: talk to the database from code

  1. How to connect a Python script to SQLite. Your first program that reads and writes a real database.
  2. Breaking and fixing a tiny login form. The one security lesson every beginner must learn early: placeholders.
  3. How to keep a connection string in an environment variable. Keeps passwords out of your code before you ever share it.

How long it takes

StageTypical time for a beginner
1One or two evenings
2Three or four evenings
3Two or three evenings
4Two or three evenings

Times vary a lot from person to person. Going slowly and typing every example yourself is far better than rushing.

A project to build along the way

Pick something small you care about: a reading list, a plant-watering log, a recipe box. Use it in every stage. By the end of stage 4 you will have a short program that stores and lists your items in a real database, which is a genuine first database-backed app.

When you finish

You will be ready for more advanced topics such as indexes, query plans and connection pools. Our sister site, databaseintegrate.com, covers those for working developers. There is no rush to get there; the basics on this path are what everything else stands on.

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.