Learn How Apps Talk to Databases, From Zero

DatabaseIntegrate.org is a free, non-commercial classroom for people writing their first database-backed app. Maybe you have built a page or a script that works, and now you need it to remember things. Maybe a bootcamp has just introduced SQL and it felt like a lot at once. Either way, this site takes things slowly: one idea per page, a picture where it helps, and a tiny piece of code you can run yourself. This hub is the map of the classroom. It groups the lessons into six clusters, in the order most beginners find easiest.

You do not need to read everything. Each cluster starts with the lesson to read first, and later lessons in a cluster build on earlier ones. If a word is unfamiliar, the beginner glossary explains it in plain English. There are no paid courses here and nothing to sign up for.

A tip before you start: keep a practice database open while you read. SQLite is ideal because it is a single file and needs no server, and every lesson's example can be typed into it in a minute. Reading about a JOIN is useful; watching one return the rows you predicted, or surprise you, is how it actually sticks. If something breaks, that is part of the lesson too, and cluster 4 explains the most common errors.

Two new lessons for this hub

We wrote two longer lessons to sit at the centre of the classroom. The first explains the site's five-step learning path and what you should be able to do at the end of each step. The second takes a small app idea, a recipe box, and turns it into a first set of tables, showing every decision along the way.

Cluster 1: What a database is

Start here if the word "database" still feels vague. These lessons explain what a database does that a text file cannot, how relational and NoSQL databases differ, and which beginner-friendly database to install first.

Cluster 2: Tables, rows and keys

Everything in a relational database lives in tables. These lessons cover rows and columns, data types, primary keys that identify each row and foreign keys that link tables together.

Cluster 3: Asking questions with SELECT

Once data is stored, you need to get it back. This cluster introduces SELECT, filtering with WHERE, sorting, grouping and joining tables, one small step at a time.

Cluster 4: Connecting your app

This is where the site's name comes from. These lessons show how an app talks to a database through a driver, how to write a connection string, and how to perform create, read, update and delete operations from your own code.

Cluster 5: Staying safe

Beginners' apps are a common target for SQL injection, and it is easy to prevent once you know how. This cluster explains the attack, shows the fix with placeholders and covers other safe habits such as backups.

Cluster 6: Designing tables well

When your app grows, table design starts to matter. These lessons introduce normalisation, relationships between tables and how far to take design rules in a first project.

When you are ready for more

After working through these clusters, you will be able to design a small set of tables, query them and connect them safely to an app. That is a real milestone. When your app starts to feel slow or you want to learn about indexes and query plans in depth, our sister site for working developers, databaseintegrate.com, picks up where this classroom ends. Until then, take your time. Every expert started with a single table.

Questions beginners ask next

Once your first tables are working, three questions tend to come up: how to remove data safely, how to keep users' passwords safe, and how to combine results from two queries. Each lesson answers one question with a small example you can run.

How these lessons are written and checked is explained in our editorial standards.