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 -> Re: Sequence design question ~~

Re: Sequence design question ~~

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Mon, 21 Aug 2000 08:27:34 +0200
Message-ID: <966875173.19063.1.pluto.d4ee154e@news.demon.nl>

Method 1 and Method 3 are going to result in locking problems. As with respect to method 2:
I would create one sequence, applicable to all boards and not bother about the fact there are holes in my numbering. That is IMO really unimportant. Otherwise, there is no problem in creating hundreds of sequences.

Could you *please* refrain from crossposting to *all* oracle forums in the future? You're wasting bandwith. This is a typical .server topic.

Hth,

Sybrand Bakker, Oracle DBA

"Chun-Yen" <agi_at_haa.com.tw> wrote in message news:8nqev8$bnf$1_at_nnrp1.deja.com...
> Hello,theres
> We want to develop a forum system. There're lots of boards in each
> forum category. When a user post a message to a board, I want to keep
> the sequence for the post for each board. Therefore, I need lots of
> sequences. In my mind, I have three methods to choose,
>
> meth1
> Just do "SELECT MAX(seq) from msg_tab where boardid=100 FOR UPDATE",
> before I insert a message to msg_tab
>
> --------------------------------------------------------------------
>
> meth2
> create a trigger to dynamic generate sequence "seq_board_100" for
> further usage, therefore, I'll have lots of sequences.
> --------------------------------------------------------------------
> meth3
> create a sequence table seq_tab ( boardid number(4),max number(10))
> each board corresponds to a record, whenever I post a message, update
> the max value for the board.
> --------------------------------------------------------------------
>
> Which one is better ??
> Any other ideas ??
> Do appreciate for any comments !!
>
> Rgds,
> Agi
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Mon Aug 21 2000 - 01:27:34 CDT

Original text of this message

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