|
-
Dec 29th, 2016, 10:37 PM
#5
Re: Should Users see ID's?
I use GUIDs instead of numeric IDs, I would suggest others do the same.
This is because a long time ago I had to make a database sync with a master DB ... and using seeded numbers is a pain to do this with since two machines can generate the same ID...
Changing to this after the initial implementation was a complete pain, as you can probably imagine...
If you use a code managed ORM ... such as Linq2SQL (as I do these days), this transition can be much much easier and less bug-prone; but the project I had to convert did not .
Now ... with this project it was incident management and they wanted an auto-incrementing number for the incident number... Basically the incident ID is actually a GUID, and the incident number is a nullable long.
It is nullable as the ID is generated to be the next incident number AFTER it hits the master server, i.e. if your on a device that is sync'ed to the master db, you do not get an incident number right away, it is null, then when the device syncs it gets the next incident number from the server as it syncs the record to it.
Also in my current program incidents numbers are the only kind of number that is "server generated" that is actually shown to the end user.
Kris
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|