Should I name my database with a singular or plural noun? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Should I name my database with a singular or plural noun?

Supposed I have a table storing a list of people's information, should I name the table “Person” or “People”?

4th Sep 2021, 7:55 PM
Tim
Tim - avatar
2 Answers
+ 1
I think you should name the tables in a plural form because they are collections (you have many persons in a table - People, or you have collection of animals so the name would be Animals). Although when you are making the Model (ER or something like that) of a Database before making it for real in that example you would be using Entities instead of Tables and you would name them in singular form because they do not represent collection but a single Entity (one person) something like a class in object oriented programming.
5th Sep 2021, 10:26 PM
Strahinja
Strahinja - avatar
+ 1
Strahinja That is spot on, couldn't really find a better explanation because I was struggling between naming my tables singular or plural because it can get very confusing to tell if it's a table or an entity when I'm trying to update the information in memory
6th Sep 2021, 9:06 AM
Tim
Tim - avatar