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: Marc Blum <marc_at_marcblum.de>
Date: Sun, 02 Jun 2002 22:45:33 +0200
Message-ID: <dd0lfuojcpk6crc3csg6pbcun3928huput@4ax.com>


On Sun, 02 Jun 2002 17:22:41 GMT, "Tintin" <nospam_at_nospam.com> wrote:

>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
>

One convention we use and which helps a lot in writing understandable SQL, especially when you deal with a lot of joins, is:

(Some may argue, that schema_name.table_name.column_name is a unique identifier per database, but 98% of your SQL will happen inside one schema and I hate aliasing everything.)

=>

CREATE TABLE employee

(emp_id NUMBER(35),
 emp_dpt_id NUMBER(35),
 emp_name VARCHAR2(4000),
 emp_birthdate DATE,
 emp_hiredate DATE)

/

Marc Blum
mailto:marc_at_marcblum.de
http://www.marcblum.de Received on Sun Jun 02 2002 - 15:45:33 CDT

Original text of this message

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