>>>>> "Josh" == Josh Berkus <josh@agliodbs.com> writes:
Josh> It's doable. Just think "nested subselects" and heavy use Josh> of the HAVING clause. They're also
screwingwith you by Josh> providing an irrelevant table (shop) and not providing a Josh> relevant table
(makers). If I was the professor, I'd give Josh> the question writer a D+ for database design ...
I would treat the table car_model as providing a complete list of
makes as well, i.e., "select distinct make from car_model" provides a
list of all car makes (from which the customer can borrow).
I'd agree that the database *should* have a makers table to constrain
the values of that column. A real-life database without it is prone
to *lots* of data entry errors (let's see, should I put in GM, Chevy
or Chevrolet?).
roland
-- PGP Key ID: 66 BC 3B CD
Roland B. Roberts, PhD RL Enterprises
roland@rlenter.com 76-15 113th Street, Apt 3B
roland@astrofoto.org Forest Hills, NY 11375