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: Why Oracle Enforce Name Uniquness ???!!!

Re: Why Oracle Enforce Name Uniquness ???!!!

From: <hasta_l3_at_hotmail.com>
Date: 3 Nov 2006 22:23:43 -0800
Message-ID: <1162621423.231733.227280@i42g2000cwa.googlegroups.com>


EdStevens wrote :

> klabu wrote:
> > Dang !
> >
> > why Oracle does not allow a table to have same name as another object type
> > ???!!!
> >
>
> Well, one could discuss "why Oracle does not allow..." until the cows
> come home. The fact is, within a schema, it doesn't allow it. So, we
> move on and decide how to deal with it. I'd ask why would you even
> WANT two objects to have the same name? If one takes the common and
> easy approach of naming tables roughly after the entities they describe
> (EMPLOYEE, PURCHASE_ORDER, etc) and procedures after what they DO ..
> (COMPUTE_FICA, FIRE_EMPLOYEE, etc.) there would be no problem. In
> other words, table names are nouns, procedure names are verbs.

That's a very important rule I agree 200% with.

However, one could very naturally be led to give the same name to a table and to a package - ie an "employee" table and the corresponding "employee" package.

Thus, the problem semantic is not discriminating enough....

(not saying that the problem is earthshaking :-)

> Some go
> even further by adding an object_type_prefix to the object name,
> especially for procedural code: "TR_" for triggers, "PKG_" for
> packages, "FN_" for functions, etc.
>
> But then, my roots are in COBOL on IBM mainframes, so I've spent a lot
> of time on nameing standards that pack as much information about the
> named object into as concise a format as possible.
Received on Sat Nov 04 2006 - 00:23:43 CST

Original text of this message

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