Random Primary Keys - messes up Patient numbers

For complex topics that regular users would not be interested in. For power users and database administrators.

Random Primary Keys - messes up Patient numbers

Postby drawab » Tue Oct 13, 2015 4:54 pm

Hi

I was hoping to install Replication servers (due to horrible internet connections situations) - having set up the process - i turned on Random Primary Keys - and the new assigned patient numbers is jumping all over the place - what used to be a human readable chronologic order of 5 digit XXXXX has now jumped to 19 digits patient number being allocated to each patient for example (8373611305246530320) and each subsequent number on another numerical planet altogether - is this expected? in such a situation

Thanks
drawab
 
Posts: 39
Joined: Tue Apr 01, 2008 4:57 am

Re: Random Primary Keys - messes up Patient numbers

Postby jsalmon » Wed Oct 14, 2015 7:05 am

That's exactly what random primary keys is designed to do. It allows you to designate ranges of keys to use for each of your servers (that are replicating) and then randomizes new PKs within those ranges for new entries to avoid collisions.
The best thing about a boolean is even if you are wrong, you are only off by a bit.

Jason Salmon
Open Dental Software
http://www.opendental.com
User avatar
jsalmon
 
Posts: 1486
Joined: Tue Nov 30, 2010 1:33 pm


Return to Advanced Topics

Who is online

Users browsing this forum: No registered users and 3 guests