With the expertise built in the last few chapters to be able to *use* an existing database, through construction of SQL queries, and programmatic construction of those queries, we now seek a better understanding on how to *design* a database. This chapter covers a practical approach to designing a *sound database*, which includes design of the *schema* for the tables and their relationships. This entails understanding the constraints of this model governing valid values within tables and also designing for the relationships between tables. The chapter concludes with SQL statements for creating tables and populating with data.
This is a preview of subscription content, log in via an institution to check access.
eBook EUR 42.79 Price includes VAT (France)
Softcover Book EUR 52.74 Price includes VAT (France)
Hardcover Book EUR 79.11 Price includes VAT (France)
Tax calculation will be finalised at checkout
Purchases are for personal use only
When the fields on both sides of a foreign key to primary key are named the same, we enable the use of the shortcut USING clause instead of ON in a table join.