From: Roland Roberts <roland@astrofoto.org>
To: pgsql-sql@postgresql.org
Subject: Re: Need help with a college SQL exam question...
Date: 04 Dec 2001 09:47:13 -0500
Message-ID: <m2667nrqj2.fsf@tycho.rlent.pnet> (raw)
In-Reply-To: <web-519065@davinci.ethosmedia.com>
References: <web-519065@davinci.ethosmedia.com>
>>>>> "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 screwing with 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: roland@astrofoto.org
Subject: Re: Need help with a college SQL exam question...
In-Reply-To: <m2667nrqj2.fsf@tycho.rlent.pnet>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox