From: | Roland Roberts <roland(at)astrofoto(dot)org> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: Need help with a college SQL exam question... |
Date: | 2001-12-04 14:47:13 |
Message-ID: | m2667nrqj2.fsf@tycho.rlent.pnet |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
>>>>> "Josh" == Josh Berkus <josh(at)agliodbs(dot)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(at)rlenter(dot)com 76-15 113th Street, Apt 3B
roland(at)astrofoto(dot)org Forest Hills, NY 11375
From | Date | Subject | |
---|---|---|---|
Next Message | Josh Berkus | 2001-12-04 17:09:05 | Re: need some help understanding sloq query |
Previous Message | James Thornton | 2001-12-04 13:29:23 | Re: update returns 1, but no changes have been made |