Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Naming conventions
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
![]() |
![]() |