Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Besides non-english (I'd guess Spanish?), where is the problem?
Not calling it "Id" but "UserId", allows consistent naming in all tables (if a n:m table between users and tickets exists, it can consist of "UserId" and "TicketId" as foreign keys, with every column having the same name as in their native tables.
Naming them all "Id" may lead to inconsistent naming of foreign keys more often ("UserId", "id_user", "user_id", "other_id"). -
Voxera113885y@sbiewald I concur, I have used both and always naming the id column id will cause problems.
Especially when you later find that different other tables gave used different local names. -
Have u ever tried to make sense of an explain with > 50 references...
And aliases...
And ID as the sole identifier name?
It's painful. Very painful. -
@sbiewald On foreign keys that's right, but on the main record id, it bothers me because I would have different names and sometimes not so obvious (here sie_x has Idx good, but what about tables with complex names?) that I have to take into account.
When joining tables, it's redundant because you already have to specify the tables, and you have to write the name twice.
By that reasoning, let's suffix every column name with the table's name, why not? -
-
-
@zvyn
Sorry, but that's more than "bad".
There are serious performance implications... I don't know of a framework that does that... -
@c3r38r170 Name your tables better?
And yes, "users_post_id" would be a clear and consistent naming.
And if abbreviations are, abbreviate the table names, but be consistent everywhere.
Related Rants
Screw this guy. Really.
(It's no foreign key, it's the actual id column.)
rant
mysql
screw this guy
id