A schema is the blueprint for organizing data: it defines tables, the data each table stores, relationships between records, and how the data can be accessed. A good schema keeps information structured, queryable, and ready to grow without turning into database spaghetti. section 10.2 section 10.7
A relational schema usually makes responsibilities and links explicit:
- Tables divide data into focused areas, with columns defining names and data types. section 10.2 section 10.2.2
- Primary keys identify rows uniquely, while foreign keys connect related tables. section 10.2.2
- Relationships describe whether records connect one-to-one, one-to-many, or many-to-many. section 10.2.2
- Design balances performance, scalability, maintenance, and redundancy; normalization reduces duplication, while denormalization may improve performance. section 10.7 section 10.2.2
Banning Books ordering schema
An ordering system can use Customers, Orders, Order_Items, Books, Reviews, and Categories tables. A customer can place multiple orders; Order_Items links orders to books; books can have reviews and categories. SQL creates the tables with CREATE TABLE, assigns primary keys, and uses REFERENCES to enforce links. section 10.2.2











































