Databases & SQL Engineering
Design schemas that enforce their own rules, write joins and aggregations that answer real questions, and make slow queries fast with indexes, transactions and EXPLAIN — on a live PostgreSQL server.
- 4 labs
- about 3 hours
- Intermediate to Advanced
Labs in this course
- 01Designing a Schema with ConstraintsIntermediate · 45 min
- 02Joins & Aggregation: Answering Real QuestionsIntermediate · 45 min
- 03Performance: Indexes, Transactions & EXPLAINAdvanced · 45 min
- 04Transactions & Rollback: Booking Without Double-BookingIntermediate · 45 min
What you will be able to do
- Create tables with SERIAL PRIMARY KEY columns in PostgreSQL
- Enforce required and unique values with NOT NULL and UNIQUE
- Combine three tables with INNER JOIN
- Compute per-row values (price × quantity) in a query
- Create an index to speed up a filtered lookup
- Read an EXPLAIN plan and tell an index scan from a sequential scan
- Read the state of a booking system with a join and a view
- Make two writes atomic with BEGIN / COMMIT
Try it now, in your browser
Five short steps on a real PostgreSQL with the same shop data the labs use, running in this tab. No account needed, and nothing is saved.
How a lab works
Each lab opens a fresh machine beside the instructions. You work in a real terminal; when you finish a task, the platform checks the machine itself and tells you what is still wrong. The machine is disposable and is removed when the timer ends, but your progress is kept.