Schema - Do you create a consistent primary key column on your tables?
Last updated by Brook Jeynes [SSW] 8 months ago.See historyMake sure you created a consistent primary key column named Id on your tables.
Employee.ID, Employee.EmployeeId, Employee.EmployeeID, Employee.Employee_Code, Employee.Employee
Figure: Bad example
Employee.Id
Figure: Good example
Why?
- We shouldn’t capitalise ID (identifier) as it is an abbreviation not an acronym.
- Using the approach [TableName]Id, e.g. EmployeeId, is redundant as we already know the context of the Id.
Love it
0
Agree
0
Disagree
0
No way
0