Re: Questions about my strategy

Поиск
Список
Период
Сортировка
От Andrew Sullivan
Тема Re: Questions about my strategy
Дата
Msg-id 20020731084936.D22284@mail.libertyrms.com
обсуждение исходный текст
Ответ на Re: Questions about my strategy  (Rob Brown-Bayliss <rob@zoism.org>)
Список 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 по дате отправления:

Предыдущее
От: Achilleus Mantzios
Дата:
Сообщение: Re: [SQL] 3-tier
Следующее
От: Justin Clift
Дата:
Сообщение: Re: Have been accepted as a writer for "The Register"