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: Serge Rielau <srielau_at_ca.ibm.com>
Date: Sun, 05 Nov 2006 16:48:36 -0500
Message-ID: <4r74hlFq85sfU1@individual.net>


hasta_l3_at_hotmail.com wrote:
> consider that Oracle allows one to create a synonym
> for a package. Now, if package and table names were
> in different namespaces, then one would have funny
> ambiguities :
>
> create table employee...
> create package employee...
> create synonym emp for employee -- which one ?
> Of course, this syntactic ambiguity could be somehow
> lifted. But then, things would become *really* funny.
I suppose a simpl ekeyword:
CREATE SYNONYM emp FOR TABLE employee
would have done the job.
But I agree that now it's too late.
Legacy is a *b**** we all have to live with :-(

> Indeed, one could very logically try to write :
> create synonym emp for table employee
> create synonym emp for package employee -- ??? two synonyms with
> same name ???

Actually that one is not an issue I believe because both synonyms could only be resolved within the namespace "environment" of the objects the y refer to. E.g. SELECT * FROM emp
Clearly a table
SELECT myschema.emp.foo() FROM myschema.emp More interesting (could be a method or a package function :-(). But Oracle already defines that it prefers columns over functions. SELECT foo FROM myschema.emp
can be function because the braces are optional.

Anyway, I have done some reading and agree that no matter the original reasons, the situation is pretty stuck.

(Just like I'll never get rid of the silly LATERAL() in DB2 land)

Cheers
Serge

-- 
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

WAIUG Conference
http://www.iiug.org/waiug/present/Forum2006/Forum2006.html
Received on Sun Nov 05 2006 - 15:48:36 CST

Original text of this message

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