Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Naming conventions?
On 2 Jun 2002 23:38:45 -0700, pagesflames_at_usa.net (Dusan Bolek) wrote:
>Marc Blum <marc_at_marcblum.de> wrote in message news:<dd0lfuojcpk6crc3csg6pbcun3928huput_at_4ax.com>...
>> One convention we use and which helps a lot in writing understandable SQL,
>> especially when you deal with a lot of joins, is:
>>
>> - Each table has a unique three character long abreviation (for example: emp for
>> employee ;-)
>
>> - Foreign keys are the column_name in the parent table prefixed with the child
>> table's prefix
>
>> CREATE TABLE employee
>> (emp_id NUMBER(35),
>> emp_dpt_id NUMBER(35),
>> emp_name VARCHAR2(4000),
>> emp_birthdate DATE,
>> emp_hiredate DATE)
>> /
>
>I hate this one. The problem with three character abreviation is that
>on all larger system you will very soon run out from *nice* ones and
>ending inevitably
> with something like D19. I do not think so that this "helps a lot in
>writing understandable SQL".
Hi,
agreed, me too I see the 400-table-database problem.
But I *know* that it helps, because I forced the use of this rule in my organisation and after three years even the 55-year-old-been-there-done-that-boneheads agreed, that it helps.
Just my experience.
Marc Blum
mailto:marc_at_marcblum.de
http://www.marcblum.de
Received on Mon Jun 03 2002 - 13:30:24 CDT