Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: Demo: Db For Dummies

Re: Demo: Db For Dummies

From: Alan <not.me_at_uhuh.rcn.com>
Date: Sun, 14 Nov 2004 18:17:08 GMT
Message-ID: <EiNld.3544$wY2.3034@trndny05>

"Gene Wirchenko" <genew_at_mail.ocis.net> wrote in message news:js2fp0d8hm0pdjmqi9v1kvtavld4rlahp4_at_4ax.com...
> jcelko212_at_earthlink.net (--CELKO--) wrote:
>
> >>> Above type queries can only be resolved via code/API at this time.
> >The psuedo code below solves similar but simpler case: <<
> >
> >Why would I want to write proceudral code for this things?
> >
> >>> "Person with uniqie hair color? That is, a person with a hair color
> >such that there doesn't exist anybody else with this color" <<
>
> I have dark brown hair, and I also have grey hair. Then, there
> are shades. I smell a bad model.
>
> >Or the hair occurs once in the population. Rewording makes life much
> >easier.
> >
> >SELECT hair_color, MAX(person_id)
> > FROM Population
> > GROUP BY hair_color
> >HAVING COUNT (*) = 1;
> >
> >And I agree with another comment; I do not see the point of these code
> >postings.
>
> Since I have dark brown hair and grey hair, what is my
> hair_color?
>
> Sincerely,
>
> Gene Wirchenko
>

Here's something to think about:

You participate in a 1:M relationship with hair color. Joe Celko does not participate at all :) Received on Sun Nov 14 2004 - 12:17:08 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US