Better design for this table?

From: Eric Nguyen <nguyenq_at_supernet.ca>
Date: Thu, 26 Jul 2001 08:05:58 -0400
Message-ID: <CDT77.56008$Mb7.1807173_at_brie.direct.ca>


Hi,

         Any body can give me a suggestion how to design a Pricing table with the following columns and rules.

           Column :   item                          null

                             item_grp                       null

                              customer                      null

                              customer_grp            null

                              price                 not null

Unique Key : item,item_grp,customer,customer_grp.

This table will be use for price search, and return the best price. I can specify up to 3 search sequences .

Example : Seq1 - Customer, item

                 Seq2  - Customer_grp , item

                 Seq3 - Item

(or 3 sequences with any combination)

So when determine the best price if I find price for seq1, that price will be use , if not the system will use seq2

to search Customer_grp, item and if not found it will use item to determine the price.

 I hope I explain well enough so that someone can help .

Thanks Received on Thu Jul 26 2001 - 14:05:58 CEST

Original text of this message