From: | Andrew Sullivan <andrew(at)libertyrms(dot)info> |
---|---|
To: | PostgreSQL General List <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Questions about my strategy |
Date: | 2002-07-31 12:49:36 |
Message-ID: | 20020731084936.D22284@mail.libertyrms.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)libertyrms(dot)info> M6K 3E3
+1 416 646 3304 x110
From | Date | Subject | |
---|---|---|---|
Next Message | John Burski | 2002-07-31 13:35:17 | Re: Have been accepted as a writer for "The Register" |
Previous Message | Achilleus Mantzios | 2002-07-31 12:26:22 | Re: [SQL] 3-tier |