Re: Questions about my strategy - Mailing list pgsql-general

From Andrew Sullivan
Subject Re: Questions about my strategy
Date
Msg-id 20020731084936.D22284@mail.libertyrms.com
Whole thread Raw
In response to Re: Questions about my strategy  (Rob Brown-Bayliss <rob@zoism.org>)
List pgsql-general
On Wed, Jul 31, 2002 at 10:46:24AM +1200, Rob Brown-Bayliss wrote:
> On Wed, 2002-07-31 at 02:34, Andrew Sullivan wrote:
> > Why not three codes: model, colour, and size?  Then you can query all
> > by model, and limit by size, colour, or both.
>
> How do you mean three codes?
>
> If you mean having more than one product code for a type of shoe thats
> what I am trying to avoid.

Nope.  A code for the product, and then other (optional) codes for
size and colour.  So, you can query by maker, and by shoe type, and
by size, and by colour:

Show me all the things by bigcorp in style hotnow that are red and
size ten is something like

    SELECT DISTINCT (shoename)
    FROM shoecodes
    WHERE maker = 'bigcorp'
    AND shoename = 'hotnow'
    AND size = 10
    AND colour = 'red';

That's a crappy example, but you get the picture?  This way you can
also get all the shoes in size ten, all the red shoes, or all the
shoes by so-and-so, or whatever.

A
--
----
Andrew Sullivan                               87 Mowat Avenue
Liberty RMS                           Toronto, Ontario Canada
<andrew@libertyrms.info>                              M6K 3E3
                                         +1 416 646 3304 x110


pgsql-general by date:

Previous
From: Achilleus Mantzios
Date:
Subject: Re: [SQL] 3-tier
Next
From: Justin Clift
Date:
Subject: Re: Have been accepted as a writer for "The Register"