DEV Community

[Comment from a deleted post]
Collapse
 
moopet profile image
Ben Sinclair

1a. Use singular names for tables unless you have a Really Good Reason™.
1b. Don't use keywords for table names.
1c. Don't say 1b doesn't matter because you'll quote everything. Just don't.

Collapse
 
moopet profile image
Ben Sinclair

Ok, so I'll revise this: stick to the singular/plural decision made by the framework you're using.

My main concern is that people aren't good at pluralising things and some things are done naively by code, such as "family" becoming "familys".

Collapse
 
hagailuger profile image
Hagai Luger • Edited

I'm not sure it's agreed to use singular names.
At least in Sql-Server it's not a common practice.
The logic is:
Table contains many records, each record is single, but the table is a collection.
So "Users" because it contains multiple records of "User".

Collapse
 
shalvah profile image
Shalvah

Why singular names?

Collapse
 
slavius profile image
Slavius

I think because most ORM frameworks do pluralization so your table Users would eventually become Userses if the framework does not include any english stemming algorithm.