Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsSurrogate auto-generated VS natural primary keys with JPA
https://www.eclipse.org/forums/index.php/mv/msg/206688/661628/#msg_661628
Any help is very much appreciated.
Thanks
]]>Eclipse User2011-03-25T15:38:49-00:00Re: Surrogate auto-generated VS natural primary keys with JPA
https://www.eclipse.org/forums/index.php/mv/msg/206688/661977/#msg_661977
If both are simple data-types, then I cannot see any benefit. Using the natural Id is probably more performant as people are more likely to query on it.
Generated Ids do have the benefit of always being unique, and never changing. Sometimes natural ids seemed to be unique or not change, but actually can change (such as ssn, name, phone number, email, etc.).
]]>James Sutherland2011-03-28T17:34:04-00:00Re: Surrogate auto-generated VS natural primary keys with JPA
https://www.eclipse.org/forums/index.php/mv/msg/206688/662102/#msg_662102
Thanks.]]>Eclipse User2011-03-29T10:32:35-00:00