4

Instead of arguing about whether the table should be called Users or User, just call it UserTable. Problem solved

Comments
  • 8
    It won't solve the argument, but at least everyone will find the name equally stupid
  • 4
    Agree 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
  • 1
    @netikras so if there's a 30%-70% share of singular-plural, attempt to keep that balance?
  • 1
    A User table should be called KevinFlynn
  • 0
    as 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
  • 1
    About 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
  • 1
    I 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..
Add Comment