Hacker News new | ask | show | jobs
by arez 2979 days ago
Person.PersonID stutters, you already know that you query on the person table you don't have to repeat it again. Naming it ID is the same consistency
1 comments

I like "Person.PersonID" because then "alias.PersonID" will produce an error if "alias" does not have a "PersonID" column. If every table has an "ID" column then "alias.ID" pretty much never fails, even if you typed the wrong alias - you just end up joining on the wrong thing and getting the wrong result set.