Re: Sequences

From: Randy Dewoolfson <randyd_at_cais3.cais.com>
Date: 1996/02/13
Message-ID: <4folq1$nhr_at_zippy.cais.net>#1/1


Is the eval_sequence supposed to be significant, or just unique? if its just unique, then you can use a regular sequence value to fill it in, (any old number will do). If you want to make it significant, (like the order in which to do the statement for this rule), then maybe thats another column, or maybe your User Interface needs to incorporate that as a Business rule about the clause, and pick an appropriate number based on whats already there.

Do multiple people/programs get to update the same rule in the rule_clause at the same time? If they do, then you have to watch out for duplication of numbers... If not then the App can handle it pretty simply.

Just some guesses...
Randy :)

Heather Dyson (dyson_at_template.com) wrote:

: I have two tables RULE and RULE_CLAUSE.
 

: The RULE table has a primary key of RULE_ID.
: The RULE_CLAUSE table has a primary key of RULE_ID (a foreign key to
: RULE) and EVAL_SEQUENCE.
 

: RULE RULE_CLAUSE
: ------- -----------
: RULE_ID NUMBER(8) RULE_ID (FK) NUMBER(8)
: EVAL_SEQUENCE NUMBER(2)

: I want to generate the RULE_ID with a sequence. The question
: is can I also generate the EVAL_SEQUENCE with a sequence knowing
: that the EVAL_SEQUENCE has to be based on the RULE_ID? In
: other words what is the easiest way to generate the EVAL_SEQUENCE
: to start at 1 for each unique RULE_ID?
 

: So I would end up with records like
 

: RULE table:
: RULE_ID
: -------
: 1
: 2
: 3
 

: RULE_CLAUSE table:
: RULE_ID EVAL_SEQUENCE
: ------- -------------
: 1 1
: 1 2
: 1 3
: 2 1
: 2 2
: 2 3
: 3 1
: 3 2
: 3 3

: Thanks for any help.
 

: Heather

--
    ..uu.                                     ----------------------
  .?$" '?i     .                              I  Randy DeWoolfson  I
 .T^M  ._at_"    d9    .     f   ,.un.  b,    i  I--------------------I
 "  Z :#"    M `8   U    <  .dP"``"# `M   _at_"  I  randyd_at_cais.com   I
    &H?`    Xl _R   $5.  $  ?*    _at_   'P,#"   I--------------------I
  ,d#^*L   :RP'~$b  f`$L:M  Xf  .f'    dH`    I        ,\//.       I
    &  'M ,P    `E  M   "$  Mux~      n!`     I        |o o|       I
   dk   `h"       ' j     " y"       *~       I====oOO==(_)==Ooo===I
Received on Tue Feb 13 1996 - 00:00:00 CET

Original text of this message