Link Details

Link 51600 thumbnail
User 217101 avatar

By gst
via damieng.com
Published: Nov 06 2007 / 22:10

Wade Wright is preaching that ID's in a database should always be GUIDs and lists four reasons. I commented there with my opinions but it hasn't shown up - some people like to censor if you don't agree with them completely. My points addressing each of his four 'reasons' were: 1. Avoid round-trips when creating new business objects I don't know about you but I don't populate my ID's until I persist and not on object creation so this reason is useless. 2. Data merging is easy Yes, this is a good reason to use GUIDs if you know merging is likely to happen. 3. Type/table ignorance Basically he says here that a foreign key reference might relate to a row in any table which breaks relational concepts big time. 4. Some weird anecdote I don't quite get
  • 13
  • 2
  • 1893
  • 712

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.