×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Unique Sequential Record Numbering

Unique Sequential Record Numbering

Unique Sequential Record Numbering

(OP)
I am currently developing two database, one in Ms Access and the other in Lotus Notes. This question I belive should be independent of language though.

The two database are both multi-site, with replication occuring every hour (or so). Users at each site are able to create records, one of which has a field that needs to be sequential and unique. That is the database records Action Items across multiple sites, and each AI must have a unique sequential number (this is in additon to a hidden primary key, that is set as a replication ID).

What is the best way to achieve this. The only method I have thought of that would enable this, is to have this number calculated on the fly, based on a date/time field, that records the time the record was created. Thus, I would count all the records created before the current one, add 1, and get the unique sequential number. The only problem is that this is really slow.

Can anyone else suggest how else this may be done?

RE: Unique Sequential Record Numbering

The day your clock is not showing the right time, you are in problems, remember the w2k? use an unique numbering system, a generator it is called in Oracle, Sql-server enfim the real systems.

A "poormans" generator should be a number/counter stored in a table, when a new record is created, it uses this number, increases it, and stores it.

Regards

S. van Els
SAvanEls@cq-link.sr

RE: Unique Sequential Record Numbering

The problem with having a number/counter in a table is concurrancy, transaction handling with that table is essential and can slow the system. I would suggest using calculating a value based on date/time just for indexing. If, for some reason, the value calculated is already in table, its easy to calculate a new one and insert. Then add a field with replication-date that is set when you replicate the row.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close