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: Dave Schweisguth <dcs_at_proton.chem.yale.edu>
Date: 1997/08/08
Message-ID: <5sf0ec$365$1@news.ycc.yale.edu>#1/1

Neil Boemio (nboemio_at_bway.net) wrote:
: Hello ..... can some of you tell me the naming conventions you're using
: for tables, indexes, constraints, sequences, any object for that
: matter. Do you start all tables with t_ and indexes with i_, and
: sequences with s_, etc.?

Tables, and views, no. Indexes and sequences, and constraints and triggers, yes. Packages have prefixes to indicate what they do, but nothing to indicate that they're packages. We don't use unpackaged PL/SQL.

: For indexes, do you include the table name and also try to include the
: columns indexed in the name as well (e.g., i_emp_last_first). Do you
: include notation for indicating if it's an index for a primary key
: constraint or a unique constraint or a not null constraint (e.g.,
: i_emp_id_pk, i_emp_last_nn, i_emp_accountno_un).

Index, sequence, constraint and trigger names contain the names of the tables with which they're associated. We don't include column names, but we do follow the prefix with a digit to distinguish multiple whatevers on the same table. Constraints are nn#_table, fk#_table, etc.

: We were also thinking about grouping related tables somehow. Should we do
: it with a prefix in the name? Like for all tables dealing with
: Mortgage-Backed Securities, we would prefix it with mbs_. Or would it be
: better to group them by schema? So we would create a user called MBS, and
: all objects relating to MBS data would be created in the MBS schema.

We don't split things by schema, but it's not a bad idea. We do prefix table names by functional role, and it works well.

Cheers,

--
| Dave Schweisguth                     CuraGen Corp., Bioinformatics Dept. |
| dcs_at_proton.chem.yale.edu             New Haven, Connecticut              |
| http://home.earthlink.net/~dschweisguth/         My opinions are my own. |
| For compliance with the NJ Right to Know Act: Contents partially unknown |
 
Received on Fri Aug 08 1997 - 00:00:00 CDT

Original text of this message

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