How do you name table/structure elements?

Steven M. List itkin at mrspoc.Transact.COM
Thu Jan 18 11:05:23 AEST 1990


sullivan at aqdata.uucp (Michael T. Sullivan) writes:
Asking about naming conventions for columns within tables in a database.

I prefer to use a descriptive name that is deliberately the same across
all tables in which the field appears.  That is, if I have a customer
ID that appears in several tables, I will call it customer_id in all
those tables.  On the other hand, I would NOT call it "ID", since that
does not tell me what it is.

In Michael's example, he had a field called "name."  I would never use
a simple field name like that, because it doesn't tell me what it is.
On the other hand, customer_name is quite descriptive and lets me know
what the field is (and what the connection is) no matter which table
it is in.
-- 
 +----------------------------------------------------------------------------+
 :                Steven List @ Transact Software, Inc. :^>~                  :
 :           Chairman, Unify User Group of Northern California                :
 :     {apple,coherent,limbo,mips,pyramid,ubvax}!itkin at guinan.Transact.COM    :



More information about the Comp.lang.c mailing list