Table names

T

Top Spin

Is there a standard on whether table names should be plural or not?

The Step-by-Step book (SweetLil db) has mostly (but not 100%) plural
table names (Baskets, Boxes, Customers), but then it does not use the
"tbl" prefix and often has spaces in table names (Box Details, Credit
Customers), which I thought was discouraged.

Is there someplace where all of these "standard" or "recommended"
conventions are listed?

--
Running MS Office 2K Pro
PC: HP Omnibook 6000
OS: Win 2K SP-4 (5.00.2195)
Email: Usenet-20031220 at spamex.com
(11/03/04)
 
N

Nikos Yannacopoulos

Using object type specific prefixes like tbl, frm, qry etc is good
prectice; not only it makes code more readable, but it also helps
differentiate between, say, a query and a form that might otherwise
share the same name.
I don't know of a global convention or a compelling argument for or
against plural in table names, I suppose it's used just because table
records usually represent collections of similar entities. There are
exceptions, of course. One example is the intermediate table in a
many-to-many relationship between, say, students and lecture, which I
would call tblAttendance (which does not avctually represent physical
entities); would it make any sense to call it tblAttendances?
Finally, there's no law against spaces, but the time you switch to the
VB screen you start regretting it (there are ways around it, but it's
easier to prevent than to cure). If you don't like concatenating words,
the underscore is always a good alternative.

HTH,
Nikos
 
J

John Vinson

Is there a standard on whether table names should be plural or not?

Sure.

In fact there are a whole LOT of standards. And they don't all agree.

"God must love database standards, She made so many of them!"
The Step-by-Step book (SweetLil db) has mostly (but not 100%) plural
table names (Baskets, Boxes, Customers), but then it does not use the
"tbl" prefix and often has spaces in table names (Box Details, Credit
Customers), which I thought was discouraged.

Is there someplace where all of these "standard" or "recommended"
conventions are listed?

In the "standards" chapters of each book which considers naming
conventions important.

I for one *usually* use plural nouns ([People], [Sales], [Products])
for table names, and eschew the use of the tbl prefix (which is
redundant; every table IS a table, I don't need the name to tell me
that) and especially avoid spaces. I prefer "camel case" instead -
[BoxDetails] for example.

John W. Vinson[MVP]
 
J

John Nurick

Is there someplace where all of these "standard" or "recommended"
conventions are listed?

There's an international standard ISO-11179, which seems to be aimed at
making data transfers easier by promoting a common approach to naming
data elements including tables and fields.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top