Hi all,

Back in the office after a day out and about and I missed a nice re-hash of stuff a while back about INT v UUIDs but there was a missing item in there that no-one seems to have picked up. An INT that is created by your own code rather than an AutoincrementingID of some form.

We have a table, with the highly original name of "nexts", that has a column for each and every id field that is used in a database and just a single row. The data in each columns id the next available integer to use for that field. We then use a suitably designed custom tag (locking, etc) that you feed with the name of the field that you want in id for, it returns that and increments the relevant column.

Effectively the same as an auto-increment but you are under control of what the id is and that can be a useful thing, none of the reading back with a MAX operator to find out what it was you just created, etc.


--

Yours,

Kym

[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to