Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> (Revised) How is the design for this complex requirement ?

(Revised) How is the design for this complex requirement ?

From: <krislioe_at_gmail.com>
Date: 1 Sep 2006 09:34:55 -0700
Message-ID: <1157128495.690450.102850@m73g2000cwd.googlegroups.com>


Hi All,

I have Customer hierarchy as follow :
  CustomerCategory
  CustomerType
  CustomerGroup
  Customer

Discount can be given to a CustomerCategory, or CustomerType, or a CustomerGroup, or a Customer , or to ALL Customer. Discount is defined in a Promotion Table

Customer Table :
  CustomerCode
  CustomerName
  CustomerCategoryCode
  CustomerTypeCode
  CustomerGroupCode

Order Table :
  OrderNo
  OrderDate
  CustomerCode
  OrderGross
  Discount

Promotion Table :
  PromoNumber
  PromoType (ALL / CustomerCategory / CustomerGroup / CustomerType / Customer)
  PCode (ALL / 'xxxx' )
  Discount

The question is :

  1. Is there any better way to define the promotion table
  2. If I do design the Promotion table like above, how is the efficient query to find the discount for an Order ??

Thank you for your help,
xtanto Received on Fri Sep 01 2006 - 11:34:55 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US