How do you name table/structure elements?

J. Scott Carr jsc at sequent.UUCP
Wed Jan 17 12:35:37 AEST 1990


In article <1990Jan16.170217.16718 at aqdata.uucp> sullivan at aqdata.uucp (Michael T. Sullivan) writes:
>I can see arguments for both but I'd like to find out what the rest
>of the world thinks about this.  One reason is curiousity but another
>is that our company is trying to come up with certain standards for
>employees to follow and this may be one of them.  Before making any
>decisions we'd like to hear different viewpoints.  Feel free to either
>send me mail or debate on the net.  Both will be helpful.  Thank you.

My preference is to prepend text that identifies the object the 
column belongs to.  The intention is that the core of the field name
represents the attribute, the prefix the object.  This is most important
with keys.  For example, part number in a parts table and a orders table
are the same attribute.  Naming the columns PRT_PARTNO and ORD_PARTNO 
helps clarify complex selects and joins, as well as the data dictionary.


--------
Scott Carr   				 uunet!sequent!jsc
Sequent Computer Systems		 (503) 526-5940



More information about the Comp.lang.c mailing list