Get the latest tech news

Use singular nouns for database table names


A common debate in relational database circles is whether the names of tables should be singular or plural. If you have a table that stores users, should the table be called user or users? The arguments for plural are straightforward: The table is storing more than one user.

A common debate in relational database circles is whether the names of tables should be singular or plural. You therefore have a mismatch, and in ORMs ( e.g., Rails) they often automatically pluralize, with the predictable result of seeing tables with names like addresss. Say you have a class called UserFacts that store miscellaneous information about a user, like age and favorite color.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of database table names

database table names

Photo of singular nouns

singular nouns