I have table Widgets and table Persons
both of them contains Identity column ( seed)
what is the recommended naming convention for the identity column ?
is it “id” ( for both tables ) :
Widgets.Id
Persons.Id
or
Widgets.WidgetId
Persons.PersonId
Is there advantages / disadvantages in the former compare to the latter ?
This is one case where I’d go for redundancy and have Thing.ThingID
Otherwise you have to alias it everywhere when you JOIN
Note: this was already done to death and beyond on programmers.se:
Why is naming a table’s Primary Key column “Id” considered bad practice?