| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: Sequence Table
Waiiit a minute.
You need to keep track of packets or messages, and also to track the asset and message or packet id, am I right?
You could use just one sequence number bucket. If it's messaging, your switch/network has to know the ESN or other unit identifier as well. So having a sequence number for each unit is unneccessary and a pain, too.
table
ASSET_MSG_TRK
ESN
MSG_ID <-- populated by trigger on insert from Mr Sequence bucket MSG_TIMESTAMP <--- populated in trigger by selecting sysdate from dual MSG_CONF <-- if your mobile assets return an "I Got IT" back to the switch MSG_TXT
PK on ESN & MSG_ID; index on the sysdate swoop through periodically to delete records with a Y msg conf and timestamp older than whatever; swoop again to delete records with an N conf and presumably a much older timestamp
In theory, if i am understanding what you are doing here; the sparsity of detail isnt helping- you'd have to have the msg_id field popped by a sequence number as bundles of packets might come in smaller than the granularity of SYSDATE, so you'd have to serialize them, or at least give them unique packet/message id's, which may NOT be consecutive, only guaranteed to be unique. Ordering by the timestamp field would make some sense out of the hash, but again, with almost no detail as to what you are trying to do, you cannot ask miracles.
well I tried
RSH.
ESN is an assumption; whatever you like that is the unique identifier of the
mobile equipment
"Jason Webber" <webber_at_mminternet_spam.com> wrote in message
news:u8drov2ja44k82_at_corp.supernews.com...
> I need a way to have a sequence for a given amount of mobile assets for a
> messaging system. Each message gets assigned a sequence number. Each
> mobile asset needs to have its own sequence to get the next number from.
I
> don't think creating a sequence object for each mobile asset sounds
> appropriate in this case since I would have to create a new sequence each
> time I add a mobile asset. Right now there could very easily be 500,000
of
> these mobile assets. I thought of just creating a table, with a varchar2
> being a unique descriptor of a mobile asset and another column
representing
> the sequence number. Is there a better way to do this so that two
threads
> in my application that are running and try to get the next sequence number
> don't end up with the same number.
>
> TIA
>
>
Received on Thu Mar 07 2002 - 04:08:23 CST
![]() |
![]() |