IMO, reading “SELECT employee.first_name” makes much more sense than “SELECT staff.first_name”.
IMO, reading “SELECT employee.first_name” makes much more sense than “SELECT staff.first_name”.
I also think the advice around join table naming is a bit silly. Calling a join table between `cars` and `mechanics` `services` (rather than `cars_mechanics`) does not make the relationship clearer, and only works when the relationships maps to a the real world where the relationship has a commonly used name.
The more I read of this guide, the uglier the SQL is.
join users as user on user….
Then do as you please without the that if you are dealing with a user or leave it plural if multiple…
And if we’re talking personal preference I really dislike caps in reserved words in sql, even before highlighting was everywhere it still just feels archaic for no good reason
SELECT employee.name where role = 'developer'
Vs
SELECT staff.name” where role = 'developer'
Then the plural one reads better
SELECT employee.Name
FROM employee
WHERE employee.Role = 'developer'
reads much better to me than SELECT employees.Name
FROM employees
WHERE employees.Role = 'developer'