Re: gregslist.sql This script is useful for chapter 9 of Head First SQL. It is based on contacts (my_contacts) for which other scripts accompany this file. In order not to conflict, we just build a new table named gregslist instead of contacts (in the center of the diagram below). However, we do blow away and reuse table profession created by the other scripts. Unorthogonally, the foreign key representing a row in t_gregslist is named "contact_id". The lower set of tables was really created in chapter 8, but we didn't do that, so we'll have to do it all now. We need all from contacts.sql, but arranged according as follows: +--------------+ +--------------+ +--------------+ | job_current | | job_desired | | job_listings | +--------------+ +--------------+ +--------------+ | contact_id |-+ +-| contact_id | | job_id | | title | \ / | title | | title | | salary | + | salary_low | | salary | | start_date | | | salary_high | | description | +--------------+ | | available | | zipcode | | | years_exp | +--------------+ | +--------------+ | +-----------+ | +---------------+ +------------------+ | interests | | |xxxxxxxxxxxxxxx| | contact_interest | +-----------+ | |xx gregslist xx| +------------------+ +->| id | | |xxxxxxxxxxxxxxx| +--| contact_id | | | interest | +--------------+ | +---------------+ | | interest_id |--+ +-----------+ | profession | +-->| id |<--+ +------------------+ +--------------+ | last_name | | | id |<--+ | first_name | | | profession | | | phone | | +-------------+ +--------------+ | | email | | +------------------+ | seeking | | | gender | | | contact_seeking | +-------------+ | | birthday | | +------------------+ +->| id | +--------------+ +---| prof_id | +--| contact_id | | | seeking | | zipcode | +----| zipcode_id | | seeking_id |--+ +-------------+ +--------------+ | +--| status_id | +------------------+ | zipcode |<-+ | +---------------+ | city | | | state | | +--------------+ | | +--------------+ | | status | | +--------------+ | | id |<---+ | status | +--------------+