Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I once had a co-worker who insisted that table names be singular and view names be plural.
–
René NyffeneggerFeb 23 '12 at 8:59

1

There are other schools of thought. 1) Use verbs that will allow one to express queries in natural language e.g. person NAMED 'fred' EARNS 20,000 (where the uppercase names are the tables). 2) use the enterprise's name for the set e.g. PERSONNEL, PAYROLL, ORG_CHART, etc.
–
onedaywhenFeb 23 '12 at 9:10

Should it always boils down to a Personal choice? What if there were 2 people working in one database design, then one might name tables as plural and the other as singular. Is there no valid reasoning as to why use Singular or Plural?
–
John Isaiah CarmonaFeb 23 '12 at 8:23

I agree about using singular as being the most sensible. This doesn't seem to be the popular opinion, if you look around at similar questions here and on SO, etc. Lots of people seem to take a programmerly view of tables as collections which should therefore have plural names. I think that maybe ORMs might be starting to break people of this (bad) habit. If your tables have plural names to begin with it makes it hard to distinguish parent and child navigation properties and to distinguish instance and collection objects for a table.
–
Joel BrownFeb 23 '12 at 12:47

3

Another reason in favour of Singular is if you have a rule that the PK is named after tablename, for example TablenameID or TablenameCode or tablename_id. With plural table names, you end up with Orders.OrdersID (which doesn't look right) or with Orders.OrderID where you use plural for table names but change to singular for column prefixes.
–
ypercubeFeb 27 '12 at 10:10

Concerning singular versus plural table names, the subject seems to be controversial, but it shouldn't be.

While a table is a collection of multiple records, a table is named after the definition of the one type of record that it contains. If a table was allowed to have a different name than that of the type of record that it contains, you could give the table a plural name, so that you could for example have an Employees table containing multiple Employee records.
But the designer of SQL did not provide for separate names for tables and record types.

Things work out more logically for object oriented programs that use the data, if the name of a record type (and by extension the table name) is kept singular, as it will correspond with the name of the class you would use to describe one record.

If you then want to identify a collection in the program, you can use a plural, or better, use an appropriate modifier, such as EmployeeList or EmployeeArray.

There is also a problem with irregular plurals for automatic code generation and programmers who have different language backgrounds or ideas about the formation of plurals in a program.

The English language is not a good and proper programming language, and trying to make database and program statements conform to English because it sounds better to read one of those statements is a mistake.

I believe SQL table should have plural names. It simply reads much better.

A table of book records should be called books. The ORM should use the same convention. The Books object is a collection, and presides over all records in the Books Table. A Book object presides over a single record.

Those seem like common words that might go in line-of-business database. Plural words seem to be less common as key words than singular words. Therefore, it might be beneficial to use plural table names so as to avoid conflict with SQL key words.

This is too close for clarity. Just stay away from reserved words, singular or plural. That really helps when debugging error messages that use plurals of reserved words interchangeably. Ideally pick words from the domain of the application to make it more relevant to use/user.
–
Emacs UserJul 18 at 0:00

It means a needless higher overhead deciphering error messages. For example, order by and orders in syntax error messages. Or trying to debug user and users in authentication error messages.
–
Emacs UserJul 18 at 20:04