naming conventions for table/column names

naming conventions for table/column names

Post by theo.verbin.. » Tue, 04 Feb 1997 04:00:00



hi all,

i was wondering of someone could help me establishing naming
conventions for database objects : which method to use for naming
tables, columns and so on

thanks for your suggestions ......

 
 
 

naming conventions for table/column names

Post by MarkP286 » Tue, 04 Feb 1997 04:00:00


From original note >>
i was wondering of someone could help me establishing naming
conventions for database objects : which method to use for naming
tables, columns and so on  <<

Boy, do you like trouble.

My I suggest Limit table names to 23 characters or less (if symetric
replication may ever be used on your system)

It will be necessary to abbreviate some words that make up part of a table
name so make a list of abbreviations for common words and insist that
these words always be abbreviated.  This will improve table naming
consistency more than you would expect at first notice.

Include the table name in the index name.

Column names should be descriptive, but should follow the table
abbreviation word list rules.  

Do not remove leading vowels if you like to strip the vowels and leave the
constantents.

Spell checkers have ruined my writing ability so please overlook my
degrading prose.

 
 
 

naming conventions for table/column names

Post by JJ Reynold » Wed, 05 Feb 1997 04:00:00


In general, you should always try to name your columns to have a
different meaning than their actual intended use.  For example, in our
database we have a table of dependants with a field called
SCHOOL_ADDRESS1, which actually has nothing to do with  whether or nor
the child is going to school-- it's always the dependant's address.
Also, be sure to name your columns in different tables differently if
they are the same thing:  IE if you have an employee date of birth, a
spouse date of birth, and dependant dates of birth, in the employee
record you could call it "DATE_OF_BIRTH", in the spouse record, you
could call it "BDATE", and in the dependant record the name "BIRTH_DATE"
fits nicely.  What's important to note here is that not once do we have
the problem of consistency in our naming scheme.  The same rules apply
to "FIRST_NAME","FIRSTNAME", and "FNAME".  It is very important to
follow these well-established rules when defining your database....

Oh.. and one other thing.  When designing your tables, don't worry about
first, second, or third normal form.  If, for example, you have an
application where a docor could practice at up to 10 different
hospitals, simply add 10 fields to the doctor table containing hospital
codes.  This way you don't have the overhead of an intermediate joins
table.

Hope this helps.. :)


 
 
 

naming conventions for table/column names

Post by jane » Wed, 05 Feb 1997 04:00:00



> In general, you should always try to name your columns to have a
> different meaning than their actual intended use.

You sure you don't work at MY shop????

;-)
janet