Re: Is there any recommended Naming Convention for Setting up DB Tables and Fields?

From: Gary Gapinski <gapinski_at_lerc.nasa.gov>
Date: 1996/05/06
Message-ID: <4ml0v1$99k_at_bytor.lerc.nasa.gov>#1/1


In article <4mg755$12ve_at_news.doit.wisc.edu>, Mirwais Qader <mqader_at_facstaff.wisc.edu> wrote:
>
>I have been having problems with our Sys. Admin. about naming our
>ORACLE Table names, fields, etc..
>
>Is there any recommended naming convention that would be useful in naming:
>
> - Table Spaces
> - Instances
> - Log Files
> - Tables
> - Fields/Columns
>
>He hates to use underscores because he says you have to press 2 keys to enter
>the character.

Is he missing any limbs or digits? If not, underscores are useful for compound-word database object names since they are case-insensitive unless quoted.

The file names don't matter one way or the other since they are seldom referred to subsequent to creation. Ditto on instance and tablespace names.

>
>He usually names programs as:
>
> qual1
> qual2
> qual3
> ..... for our Quality Control System
>
>Users have a hard time distinguishing between these, but he likes them because
>he knows they are all associated with the Quality Control System.

Hmmm... avoid telling him that stored procedures are analogous to programs.

>
>He wants to name all our tables as 2 or 3 characters.
>Ex. Customer = C or Cs or Cust
> Equipment = eq
> Media = med
> Phone_Log = fonelg
> Employee = emp
>
>He has 2 major concern:
>
> 1. Too many keystrokes when typing in SQL queries.
> 2. System Administration tasks would be more complicated if we have long
> names that he will have to type on a daily basis.
>
> Note: He has never worked with Oracle to know ALL the Sys. Admin tasks
> that may be needed on a day to day basis.
>
>My argument is that they should be descriptive names that everyone can understand.
>I think that we won't be typing in 'So Many' SQL queries that we will lose
>considerable amount of work time. Also, we can use aliases if needed.
>
>Any suggestions will be appreciated!

The sysadmin will not be querying the data base. In fact, if he sets things up properly, the only work required will be observation to assure proper day-to-day operation.

I would hope that SQL will not be the sole user interface. Most users never gain fluency in the language.

Use names that are as descriptive as possible (but see below).

The use of scripts allows "daily operations" to be relegated to absentee processes.

If the community of developers is very good at committing a large dictionary of acronyms to memory, short names are acceptable. The drawback is that the maintenance effort requires the same commitment.

>
>What kind of names are people out there using?
>

Whatever we like. Preferences vary. You may wish to keep table names on the short side once you start trying to name constraints and triggers. A thread on this topic surfaced within the last week or so.

My personal preference is as long/descriptive as possible within the constraints of a naming scheme that includes the use of table and column names compounded to designate constraints, triggers, and references. This does cause complex statements to become quite large.

Regards,

Gary

-- 
__________________________________________________________
Gary Gapinski                email: Gapinski_at_lerc.nasa.gov
NASA Lewis Research Center   voice: +1 216 433 5251
Received on Mon May 06 1996 - 00:00:00 CEST

Original text of this message