Appendix A
The Schema
Every query in this volume runs against the same eleven-table schema — a generic operations database: people, money, products, orders, the usual. Click through to see columns and relationships in full.
- Table 0110 cols
employees
PK · emp_id
FK · dept_id, manager_id
- Table 025 cols
departments
PK · dept_id
no foreign keys
- Table 036 cols
salary_history
PK · history_id
FK · emp_id
- Table 047 cols
projects
PK · project_id
FK · dept_id
- Table 056 cols
project_assignments
PK · assign_id
FK · emp_id, project_id
- Table 066 cols
customers
PK · cust_id
no foreign keys
- Table 076 cols
products
PK · product_id
FK · cat_id
- Table 086 cols
orders
PK · order_id
FK · cust_id
- Table 096 cols
order_items
PK · item_id
FK · order_id, product_id
- Table 103 cols
categories
PK · cat_id
FK · parent_id
- Table 115 cols
suppliers
PK · sup_id
no foreign keys