Capstone: Design a Schema
Part of the PostgreSQL course
Every lesson so far handed you a table and asked you to query it. Real work runs the other way round: somebody describes a product, and you have to decide what the tables are, which columns can be null, what happens when a user is deleted, and which of the queries the product will run are going to be slow. That is the skill this capstone is for.
Try each step yourself before reading the version below it. Getting a design slightly wrong and then seeing why is worth more than copying one that works. ...
Want to learn PostgreSQL Capstone: Design a Schema in a real environment?
Click below, get a fresh Linux box with PostgreSQL ready to go, and work through Capstone: Design a Schema hands-on with an AI tutor that knows your code.
Start this lessonCapstone: Design a SchemaWhat you'll learn
- Schema design
- Primary and foreign keys
- Indexes on hot columns
- Updated_at trigger
- JSONB metadata
- Joins with aggregates
- Top N query
Read this lesson in your language
All lessons in this course
14 lessons- 1What is PostgreSQL20 min
- 2psql and First Commands25 min
- 3Creating Databases and Tables30 min
- 4Data Types25 min
- 5SELECT and WHERE30 min
- 6Joins35 min
- 7Aggregates and Grouping30 min
- 8Indexes35 min
- 9Transactions and Isolation35 min
- 10Functions and Triggers35 min
- 11JSONB and Arrays35 min
- 12EXPLAIN and Query Tuning35 min
- 13Backup and Restore25 min
- 14Capstone: Design a Schema60 min
