Build a support-ticket data service with relational tables and SQL queries in Cloudflare D1. You will search records, evolve a schema, preserve related data and recover accidental loss.
The course contains seven guided labs and one independent migration-repair challenge. SQL concepts are introduced alongside a small JavaScript Worker and its D1 binding.
What You Will Learn
- Create a table with data rules for support tickets
- Build prepared CRUD and search queries through a Worker
- Roll out a schema migration while retaining existing data
- Join and index ticket activity for useful reports
- Keep related writes atomic
- Continue session reads using bookmarks
- Export and rebuild a database and recover with Time Travel
- Repair a failed migration without losing valid tickets
Who This Course Is For
Workers developers who want to add relational storage and practice safe schema changes and recovery.
Prerequisites: Complete Workers foundations and Connect LabEx to Your Cloudflare Account. You should understand a small JavaScript Worker; prior SQL experience is not required.
Learning environment: Every lab starts independently in a fresh LabEx VM with your own authorized learning account. Create uniquely named disposable resources and use small synthetic datasets. D1 usage counts toward shared account allowances; no purchased domain is needed.
Frequently Asked Questions
Do I need to learn SQL first?
No. Keys, constraints, queries, joins and indexes are introduced when the ticket application needs them. You should already understand a Worker handler and deployment.
Will I work with local or cloud data?
Follow each lab’s specified target and verify the resulting records and responses. Do not assume local database state is the same as deployed data.
What recovery skills are included?
You practice SQL exports, rebuilding a database and Time Travel recovery. The challenge repairs a migration while preserving existing tickets.
Can I reuse a previous lab database?
Each lab creates its own independent resources. Carry forward knowledge and your account, delete only lab-owned resources while authorized, verify removal and then log out.





