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)
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.
Andrew Sullivan 87 Mowat Avenue
Liberty RMS Toronto, Ontario Canada
<andrew(at)libertyrms(dot)info> M6K 3E3
+1 416 646 3304 x110
In response to
pgsql-general by date
|Next:||From: John Burski||Date: 2002-07-31 13:35:17|
|Subject: Re: Have been accepted as a writer for "The Register"|
|Previous:||From: Achilleus Mantzios||Date: 2002-07-31 12:26:22|
|Subject: Re: [SQL] 3-tier|