posted 17 years ago
I like compound keys. Get one part from some source, say a database sequence number, and construct the other part in code. I used one with a 10-digit sequence from the database plus a 3 digit sequence in the app server. The app server requested a new sequence from the db at startup and after every 1000 keys.
Your disconnected clients could get a high-order-part for the key before going remote. Or maybe they could operate with only their low-order part while disconnected, and map those keys to compound keys while uploading to the central app?
We rejected UUID because users had to see and talk about "case numbers" for ongoing work. We inserted punctuation in the compound key to make it easier to look at: 12345-67890-123.
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi