Re: Plural or singular table names

From: Paul Vernon <paul.vernon_at_ukk.ibmm.comm>
Date: Mon, 1 Sep 2003 19:19:32 +0100
Message-ID: <bj02ov$1332$1_at_gazette.almaden.ibm.com>


"Ray Cassick (home)" <raycassNOSPAM_at_adelphia.net> wrote in message news:4qf4b.11737$Nc.6608551_at_news1.news.adelphia.net...
> Well my company is going through its processes of writing company standards
> documents and we are at the age old question:
>
> "Should table names be in the plural or singular forms?"
[snip]

For what it is worth, my rather strong belief is that attributes should be named so that they capture as far as possible the tuple predicted.

For example, in
http://www.hughdarwen.freeola.com/TheThirdManifesto.web/Missing-info-without-nulls.pdf Hugh Darwen has a table called PERS_INFO with attributes {Id, Name, Job, Salary}and suggest this predicate as the meaning of any tuple in the table

  The person identified by Id is called Name and has the job of a Job, earning Salary pounds per year.

I belive that these rather wordy predicates should be approximated by the attribute names. In the above example I would suggest naming the attributes to

  { Person_Id, Called_Name, Does_Job, Earns_Salary }

Later on Hugh shows two more tables SALARY_UKN and UNSALARIED both with one attribute named { Id }. By my scheme, these attributes would be more resonable be name {Person_with_unk_salary} and {Unsalaried_Person }respectivly.

Now, what has this got to do with table names I hear you ask? Well the answer (for me) is that a table name should seen as little more than a short hand for the tuple predicate of that table. In the case at hand, PERSON_INFO is not a bad name (IMO) for the (highly non gramatical) sentance "Person_Id Called_Name Does_Job Earns_Salary". PERSON on it's own would also be ok(ish). What would not be good (as a name for a predicate) is any Plural name. PEOPLE_INFO, or INFO_ABOUT_PERSONS, or just plain PERSONS or PEOPLES are all not good.

So, to sum up, if you happen to feel the need to give a table a name, use one that is suggesting of the predicate and that will be a singular name.

Regards
Paul Vernon
Business Intelligence, IBM Global Services Received on Mon Sep 01 2003 - 20:19:32 CEST

Original text of this message