Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Oracle Naming Conventions

Re: Oracle Naming Conventions

From: Dave Schweisguth <dcs_at_proton.chem.yale.edu>
Date: 1997/04/15
Message-ID: <5j03nu$2gj@news.ycc.yale.edu>#1/1

Nathan Secrist (nsecrist_at_evolving.com) wrote:
: We are in the process of developing a set of Oracle naming conventions to
: follow and are interested to see what other groups/organizations have come
: up with.

Chapters 2 and 27 of Oracle The Complete Reference (G. Koch and K. Loney, 3rd edition) give good advice on naming conventions.

: Tables

No special opinions here (CuraGen, not Yale), although we generally agree with the above reference.

: Columns

Ditto, with the additional rule that columns which are foreign keys must have the same names are their parents. This effectively puts all columns in a single namespace. I held out for "tabname_colname references(tabname.colname)", but was voted down. We've done fine so far.

: Indexes

i#_tabname

: Primary Keys

pk_tabname

: Foreign Keys

fk#_tabname

: Check Constraints

c#_tabname
nn#_tabname for not nulls, which are implemented as checks but specified by a

    separate syntax

: Triggers

t#_tabname

No comment on the rest. In the above, # is a digit or two just for differentiating multiple constraints on the same table. It's occurred to me that we could use the column position, but we don't at the moment.

I'd wanted tabname to come first in all of the above, but, again, it was a group effort.

The question is, what goals do you expect your conventions to accomplish? The above accomplish the goal reasonably well of telling one what exactly it is that one just selected out of user_constraints. If I liked Schema Manager better than I do, I might take the policy of using only generated constraints. Does anyone do that?

Cheers,

--
| Dave Schweisguth                        For purposes of complying with    |
| dcs_at_proton.chem.yale.edu (MIME OK)      the New Jersey Right to Know Act: |
| http://proton.chem.yale.edu/~dcs/       Contents partially unknown.       |
| Yale Depts. of MB&B & Chemistry   Phone: 203-432-5208   Fax: 203-432-6144 |
Received on Tue Apr 15 1997 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US