Free course
Cloudflare D1 Course
Build a relational Worker application with D1, SQLite, prepared statements, migrations, local and remote databases, transactions, backups, and production operations.
Prerequisites: Cloudflare Workers, SQL and SQLite
Your progress
of lessons completed.
Course completed.
What you'll learn
Build, migrate, query, test, deploy, back up, and recover a small D1-backed application without mixing local and production data.
Take this course offline
Subscribe to my newsletter to get every free book and course in PDF and EPUB format.
Get the downloadsCourse contents
D1 foundations
Understand managed SQLite, databases, bindings, local state, and where D1 fits.
Schema and migrations
Create a schema, version changes, apply migrations deliberately, and preserve compatibility.
Queries and transactions
Use prepared statements, binding, batches, transactions, indexes, and query plans.
Application patterns
Build CRUD, pagination, validation, authorization, idempotency, and optional ORM integration.
Test, back up, and operate D1
Test real bindings, inspect production, use time travel, observe failures, and recover.