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

From Andrew Sullivan
Subject Re: Questions about my strategy
Date
Msg-id 20020730103440.C5295@mail.libertyrms.com
Whole thread Raw
In response to Re: Questions about my strategy  (Rob Brown-Bayliss <rob@zoism.org>)
Responses Re: Questions about my strategy
List pgsql-general
On Tue, Jul 30, 2002 at 01:58:33PM +1200, Rob Brown-Bayliss wrote:
> The business is shoe retail, so he buys a shoe, say it's called "Trek"
> made by "Joes Shoe makers".  When He buys 400 of these, they might be
> 200 white, 100 black, 100 red, but also spread accross 10 different
> sizes.
>
> On other systems he has had to have aproduct code for each possible
> combo, one for wihte  size 35, one for white size 35.5 etc.
>
> Then he cant get a count of how many "treks" he has in stock.  I
> fuggured this way I can give a simple "389 total treks in stock" answer,
> or a "137 white treks" or a "24 white size 35 treks".

Why not three codes: model, colour, and size?  Then you can query all
by model, and limit by size, colour, or both.

I think your strategy will work, but it has the potential to degrade
seriously over time, or else to require some sort of regular
maintenance.  Nothing wrong with that, of course, just a potential
pitfall.

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: Robert Treat
Date:
Subject: Re: log sql?
Next
From: Andrew Sullivan
Date:
Subject: Re: Importing data