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

Re: naming conventions for constraints

From: Jan Gelbrich <j_gelbrich_at_westfalen-blatt.de>
Date: Wed, 30 Apr 2003 14:09:00 +0200
Message-ID: <b8oefq$bv8fj$1@ID-152732.news.dfncis.de>


"Sönke Petersen" <sk.petersen_at_gmx.de> schrieb im Newsbeitrag news:b8odom$f2d$1_at_news.mch.sbs.de...
> Hello,
>
> after studying some documents on naming conventions the main
recommendations
> for constraints seem to be that constraints should be named as the table
it
> is applied to, followed by a suffix which identifies its type.
>
> table name: systems
>
> possible constraint names could be:
>
> systems_pk --> primary key constraint
> systems_fk --> first foreign key constraint
> systems_fk2 --> second foreign key constraint
>
> A second approach could be to apply the column name as well:
>
> systems_id_pk --> primary key constraint
> systems_hostname_fk --> foreign key constraint
>
> What are your opinions?
>
> Sönke
>

Whatever makes sense to you, you just should keep up your standards. I have seen so many naming "standards" that I don´t wonder about anything anymore :-|

O.K., but Your approach seems good. Some prefer Pre- instead of Suf-fixes.

hth, Jan Received on Wed Apr 30 2003 - 07:09:00 CDT

Original text of this message

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