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: Naming conventions?

Re: Naming conventions?

From: Steve M <steve.mcdaniels_at_vuinteractive.com>
Date: Tue, 11 Jun 2002 14:50:41 -0700
Message-ID: <ae5r9r$mvc$1@spiney.sierra.com>


Here is the official list of standards: (empty list)

Here is my list of standards.

Never let the Oracle database assign your primary key names (e.g., SYS301223) primary keys: PK_table_name e.g., PK_addresses

indexed field I_table_name_field_name e.g., I_addresses_zipcode

unique indexed field IU_table_name_field_name e.g., IU_city_state_citystate

always use underscores to separate words in names e.g., date_of_birth rather than dateofbirth

never depend on case to infer meaning e.g., bad: MyTableName (MYTABLENAME) ==> MY_TABLE_NAME all datafiles should end in the same extension e.g., .dbf (.dat is ok, but lots of different apps use this.)

I use <something>data for tablespace names and <something>user for usernames

    e.g. CUSTDATA and CUSTUSER

Use the same indentation style for all queries. I use:

    select <field names....>
    from <tablenames...>
    where <conditions....>

           <AND/OR> <conditions>

We do warehouse-style processing here, so for us it is important to know when we're using a view versus a regular table. So, we use V_<name> to indicate a view. e.g., select * from v_show_jobs

<not so standard but helpful>
I use the form MY_<fieldname> for local (procedural) variables which hold table data. e.g.,

    select address1, address2 into my_address1, my_address2 from addresses where address_id = my_address_id;

"Tintin" <nospam_at_nospam.com> wrote in message news:BvsK8.18587$LC3.1333010_at_bgtnsc04-news.ops.worldnet.att.net...
> Does anyone have a good naming convention for table, columns, indexes,
etc.
> that I can use? From what I see, I don't think Oracle has one. I tried
to
> make up my own, but came across some problems.
>
> Thank you.
>
> ~ !T
>
>
Received on Tue Jun 11 2002 - 16:50:41 CDT

Original text of this message

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