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
-
localpost420011dIt won't solve the argument, but at least everyone will find the name equally stupid
-
netikras3484811dAgree the project's naming conventions upfront: whether you'll be using singulars or plurals in table names, whether/how you'll prefix table and index object names, etc.
As for now - look at the other tables' names and make it like them -
@netikras so if there's a 30%-70% share of singular-plural, attempt to keep that balance?
-
kiki3525411das of now I try to create as few names as possible. If I can copy and paste a name, I’ll do it. So the field in SQL, the variable on the server, the variable in client side JS and the class name on a DOM element will be named exactly the same. Fewer names = fewer inconsistencies
-
kiki3525411dAbout user vs users though… user is an entity, and users is a storage that stores instances of that entity. If it’s happens to be a SQL table then it should be named users
-
myss445011dI was all for plural until I started working with ORMs and entities that needed to a join table that would play nicely with them.
Somehow user_signature sounds much better then users_signatures.
I know that from database design and how it was imagined to work in a first place plural was the way to go, however modern tools and semantics made singular much more attractive and senseful somehow.
Though on private projects I still fight with my preferences from time to time.
Ohh and let's not start about naming http resources..
Instead of arguing about whether the table should be called Users or User, just call it UserTable. Problem solved
rant