Welcome Guest, Not a member yet? Register   Sign In
Why I use UUIDs for primary/foreign keys
#2

[eluser]Dam1an[/eluser]
First up, I'm going to say I use auto increment ID's, not cause I don't know any better, but cause I prefer not to have either strings or UUIDs as a primary key
Lets say you've got any sort of system where you access 'stuff' by passing the ID in the URL, such as users/123, much nicer then users/3857ab365-3857ab365-3857ab365-3857ab365
(another alterntive in the above example would be using the email as the PK, definatly don't want that as a link)

Also, you say it's very unlikely to get a collision, and they're unique accross databases as well, surely there will be a clash eventually (and without exhausting all 16^32 possibilities)

And lastly, going back to your main point, people who write libraries are unlikely to cater for a small number of users that use UUIDs when they have a much, much larger portion of users using standard auto increment IDs


Messages In This Thread
Why I use UUIDs for primary/foreign keys - by El Forum - 06-06-2009, 03:56 PM
Why I use UUIDs for primary/foreign keys - by El Forum - 06-06-2009, 04:10 PM
Why I use UUIDs for primary/foreign keys - by El Forum - 06-06-2009, 04:28 PM
Why I use UUIDs for primary/foreign keys - by El Forum - 06-06-2009, 05:01 PM
Why I use UUIDs for primary/foreign keys - by El Forum - 06-06-2009, 07:02 PM
Why I use UUIDs for primary/foreign keys - by El Forum - 06-06-2009, 07:44 PM
Why I use UUIDs for primary/foreign keys - by El Forum - 06-07-2009, 07:06 AM
Why I use UUIDs for primary/foreign keys - by El Forum - 06-07-2009, 07:11 AM
Why I use UUIDs for primary/foreign keys - by El Forum - 06-07-2009, 07:32 AM
Why I use UUIDs for primary/foreign keys - by El Forum - 06-07-2009, 09:11 AM
Why I use UUIDs for primary/foreign keys - by El Forum - 06-07-2009, 09:59 AM
Why I use UUIDs for primary/foreign keys - by El Forum - 06-07-2009, 10:34 AM
Why I use UUIDs for primary/foreign keys - by El Forum - 06-07-2009, 10:49 AM
Why I use UUIDs for primary/foreign keys - by El Forum - 06-08-2009, 12:47 AM
Why I use UUIDs for primary/foreign keys - by El Forum - 06-08-2009, 01:47 AM
Why I use UUIDs for primary/foreign keys - by El Forum - 06-08-2009, 02:03 AM
Why I use UUIDs for primary/foreign keys - by El Forum - 06-08-2009, 02:24 AM
Why I use UUIDs for primary/foreign keys - by El Forum - 06-08-2009, 07:41 AM
Why I use UUIDs for primary/foreign keys - by El Forum - 06-08-2009, 07:45 AM
Why I use UUIDs for primary/foreign keys - by El Forum - 06-08-2009, 07:52 AM
Why I use UUIDs for primary/foreign keys - by El Forum - 06-08-2009, 08:08 AM
Why I use UUIDs for primary/foreign keys - by El Forum - 06-08-2009, 08:12 AM
Why I use UUIDs for primary/foreign keys - by El Forum - 06-08-2009, 08:15 AM
Why I use UUIDs for primary/foreign keys - by El Forum - 06-08-2009, 08:21 AM
Why I use UUIDs for primary/foreign keys - by El Forum - 06-08-2009, 08:24 AM
Why I use UUIDs for primary/foreign keys - by El Forum - 06-08-2009, 08:26 AM
Why I use UUIDs for primary/foreign keys - by El Forum - 06-08-2009, 08:28 AM
Why I use UUIDs for primary/foreign keys - by El Forum - 06-08-2009, 08:30 AM
Why I use UUIDs for primary/foreign keys - by El Forum - 06-08-2009, 08:33 AM
Why I use UUIDs for primary/foreign keys - by El Forum - 06-08-2009, 08:35 AM
Why I use UUIDs for primary/foreign keys - by El Forum - 06-08-2009, 08:39 AM
Why I use UUIDs for primary/foreign keys - by El Forum - 06-08-2009, 08:39 AM
Why I use UUIDs for primary/foreign keys - by El Forum - 06-08-2009, 08:46 AM
Why I use UUIDs for primary/foreign keys - by El Forum - 06-08-2009, 08:52 AM
Why I use UUIDs for primary/foreign keys - by El Forum - 06-08-2009, 08:53 AM
Why I use UUIDs for primary/foreign keys - by El Forum - 06-08-2009, 08:59 AM
Why I use UUIDs for primary/foreign keys - by El Forum - 06-08-2009, 09:01 AM
Why I use UUIDs for primary/foreign keys - by El Forum - 06-08-2009, 09:04 AM
Why I use UUIDs for primary/foreign keys - by El Forum - 06-08-2009, 09:12 AM
Why I use UUIDs for primary/foreign keys - by El Forum - 06-08-2009, 06:08 PM
Why I use UUIDs for primary/foreign keys - by El Forum - 06-08-2009, 09:44 PM
Why I use UUIDs for primary/foreign keys - by El Forum - 06-08-2009, 09:49 PM



Theme © iAndrew 2016 - Forum software by © MyBB