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

Home -> Community -> Usenet -> c.d.o.server -> Re: Naming conventions

Re: Naming conventions

From: Joel Garry <joel-garry_at_home.com>
Date: 19 Dec 2001 11:08:21 -0800
Message-ID: <91884734.0112191108.2fb8e022@posting.google.com>


Uwe Schneider <us_at_webde-ag.de> wrote in message news:<3C20B51B.E3815704_at_webde-ag.de>...
> Pacman wrote:
> >
> > I'm a junior DBA for Oracle and wondered if there are naming conventions for
> > indexes, sequences, etc. With them sharing a global namespace it would be
> > useful to know if there is a PDF or something out there to explain this.
> >
>
> Any naming convention is OK as long it is non-ambiguous and evident.
> Names of Objects must be uniwue within their schema.
>
> We do use
> - id for the PK
> - pk_table for PK constraint
> - fk_table_table for FKs
> - ix_table_rows for indexes
> - seq_table for sequences
> - tr_table_event for triggers
>
> and so on.
>
> U.

I would add, since it is often not immediately obvious to juniors, that you should explicitly name things when you have a choice (like CREATE statements). There are a number of things like constraints and indices that Oracle will gladly name for you, and this can sometimes come back later to haunt you, like if someone tries to reverse engineer a schema into a design tool. Of course, some tools have bugs or inadequacies to compound the problem.

jg

--
Many US government representatives much prefer you do not email them,
current events notwithstanding.  Email is very good for organizing
political movements, but very bad for getting representatives to do
things.  An overloaded inbox will be ignored.  Phones ringing off the
hook and sacks of mail get attention.
Received on Wed Dec 19 2001 - 13:08:21 CST

Original text of this message

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