← All drills

Persist It: A Database Behind Your API

What you'll be able to do

Put a service on a real database, change its shape without losing data, find and fix its slow queries, and keep its data correct when things fail and when many users act at once.

⌁ Every application that keeps state: shops, bookings, banking, accounts. Migrations, indexes, transactions and constraints are the everyday toolkit of backend teams, on PostgreSQL, MySQL or SQLite.
Start this internship
Create an account to unlock the 5 sections, the workbench, and askThili.
Begin

Sections

1. Persist It: A Database Behind Your API
🔒 locked
2. Lesson 1 - Model the Data
🔒 locked
3. Lesson 2 - Change It Safely
🔒 locked
4. Lesson 3 - Make It Fast
🔒 locked
5. Lesson 4 - Keep It Correct
🔒 locked

Dig deeper

🔗SQLAlchemy 2.0 documentation
docs
🔗SQLAlchemy ORM quick start
docs
🔗Alembic tutorial
docs
🔗Alembic: running batch migrations for SQLite
docs
🔗SQLite: the query planner
docs
🔗SQLite: foreign key support
docs
🔗SQLite: transactions
docs
🔗PostgreSQL: concurrency control
docs
🔗Python sqlite3 module
docs