<s>
In	O
databases	O
,	O
a	O
synonym	B-Application
is	O
an	O
alias	O
or	O
alternate	O
name	O
for	O
a	O
table	B-Application
,	O
view	B-Language
,	O
sequence	O
,	O
or	O
other	O
schema	B-Application
object	I-Application
.	O
</s>
<s>
Because	O
a	O
synonym	B-Application
is	O
just	O
an	O
alternate	O
name	O
for	O
an	O
object	O
,	O
it	O
requires	O
no	O
storage	O
other	O
than	O
its	O
definition	O
.	O
</s>
<s>
When	O
an	O
application	O
uses	O
a	O
synonym	B-Application
,	O
the	O
DBMS	B-General_Concept
forwards	O
the	O
request	O
to	O
the	O
synonym	B-Application
's	O
underlying	O
base	O
object	O
.	O
</s>
<s>
By	O
coding	O
your	O
programs	O
to	O
use	O
synonyms	B-Application
instead	O
of	O
database	O
object	O
names	O
,	O
you	O
insulate	O
yourself	O
from	O
any	O
changes	O
in	O
the	O
name	O
,	O
ownership	O
,	O
or	O
object	O
locations	O
.	O
</s>
<s>
Synonyms	B-Application
are	O
very	O
powerful	O
from	O
the	O
point	O
of	O
view	B-Language
of	O
allowing	O
users	O
access	O
to	O
objects	O
that	O
do	O
not	O
lie	O
within	O
their	O
schema	B-Application
.	O
</s>
<s>
All	O
synonyms	B-Application
have	O
to	O
be	O
created	O
explicitly	O
with	O
the	O
CREATE	O
SYNONYM	B-Application
command	O
and	O
the	O
underlying	O
objects	O
can	O
be	O
located	O
in	O
the	O
same	O
database	O
or	O
in	O
other	O
databases	O
that	O
are	O
connected	O
by	O
.	O
</s>
<s>
There	O
are	O
two	O
major	O
uses	O
of	O
synonyms	B-Application
:	O
</s>
<s>
Object	O
invisibility	O
:	O
Synonyms	B-Application
can	O
be	O
created	O
to	O
keep	O
the	O
original	O
object	O
hidden	O
from	O
the	O
user	O
.	O
</s>
<s>
Location	O
invisibility	O
:	O
Synonyms	B-Application
can	O
be	O
created	O
as	O
aliases	O
for	O
tables	O
and	O
other	O
objects	O
that	O
are	O
not	O
part	O
of	O
the	O
local	O
database	O
.	O
</s>
<s>
When	O
a	O
table	B-Application
or	O
a	O
procedure	O
is	O
created	O
,	O
it	O
is	O
created	O
in	O
a	O
particular	O
schema	B-Application
,	O
and	O
other	O
users	O
can	O
access	O
it	O
only	O
by	O
using	O
that	O
schema	B-Application
's	O
name	O
as	O
a	O
prefix	O
to	O
the	O
object	O
's	O
name	O
.	O
</s>
<s>
The	O
way	O
around	O
for	O
this	O
is	O
for	O
the	O
schema	B-Application
owner	O
creates	O
a	O
synonym	B-Application
with	O
the	O
same	O
name	O
as	O
the	O
table	B-Application
name	O
.	O
</s>
<s>
Public	O
synonyms	B-Application
are	O
owned	O
by	O
special	O
schema	B-Application
in	O
the	O
Oracle	B-General_Concept
Database	I-General_Concept
called	O
PUBLIC	O
.	O
</s>
<s>
As	O
mentioned	O
earlier	O
,	O
public	O
synonyms	B-Application
can	O
be	O
referenced	O
by	O
all	O
users	O
in	O
the	O
database	O
.	O
</s>
<s>
The	O
following	O
code	O
shows	O
how	O
to	O
create	O
a	O
public	O
synonym	B-Application
for	O
the	O
employee	O
table	B-Application
:	O
</s>
<s>
Now	O
any	O
user	O
can	O
see	O
the	O
table	B-Application
by	O
just	O
typing	O
the	O
original	O
table	B-Application
name	O
.	O
</s>
<s>
If	O
you	O
wish	O
,	O
you	O
could	O
provide	O
a	O
different	O
table	B-Application
name	O
for	O
that	O
table	B-Application
in	O
the	O
CREATE	O
SYNONYM	B-Application
statement	O
.	O
</s>
<s>
Remember	O
that	O
the	O
DBA	O
must	O
create	O
public	O
synonyms	B-Application
.	O
</s>
<s>
Just	O
because	O
you	O
can	O
see	O
a	O
table	B-Application
through	O
public	O
(	O
or	O
private	O
)	O
synonym	B-Application
does	O
n’t	O
mean	O
that	O
you	O
can	O
also	O
perform	O
SELECT	O
,	O
INSERT	O
,	O
UPDATE	O
or	O
DELETE	O
operations	O
on	O
the	O
table	B-Application
.	O
</s>
<s>
A	O
private	O
synonym	B-Application
is	O
a	O
synonym	B-Application
within	O
a	O
database	B-Application
schema	I-Application
that	O
a	O
developer	O
typically	O
uses	O
to	O
mask	O
the	O
true	O
name	O
of	O
a	O
table	B-Application
,	O
view	B-Language
stored	O
procedure	O
,	O
or	O
other	O
database	O
object	O
in	O
an	O
application	O
schema	B-Application
.	O
</s>
<s>
Private	O
synonyms	B-Application
,	O
unlike	O
public	O
synonyms	B-Application
,	O
can	O
be	O
referenced	O
only	O
by	O
the	O
schema	B-Application
that	O
owns	O
the	O
table	B-Application
or	O
object	O
.	O
</s>
<s>
You	O
may	O
want	O
to	O
create	O
private	O
synonyms	B-Application
when	O
you	O
want	O
to	O
refer	O
to	O
the	O
same	O
table	B-Application
by	O
different	O
contexts	O
.	O
</s>
<s>
Private	O
synonym	B-Application
overrides	O
public	O
synonym	B-Application
definitions	O
.	O
</s>
<s>
You	O
create	O
private	O
synonyms	B-Application
the	O
same	O
way	O
you	O
create	O
public	O
synonyms	B-Application
,	O
but	O
you	O
omit	O
the	O
PUBLIC	O
keyword	O
in	O
the	O
CREATE	O
statement	O
.	O
</s>
<s>
The	O
following	O
example	O
shows	O
how	O
to	O
create	O
a	O
private	O
synonym	B-Application
called	O
addresses	O
for	O
the	O
locations	O
table	B-Application
.	O
</s>
<s>
Note	O
that	O
once	O
you	O
create	O
the	O
private	O
synonym	B-Application
,	O
you	O
can	O
refer	O
to	O
the	O
synonym	B-Application
exactly	O
as	O
you	O
would	O
the	O
original	O
table	B-Application
name	O
.	O
</s>
<s>
Synonyms	B-Application
,	O
both	O
private	O
and	O
public	O
,	O
are	O
dropped	O
in	O
the	O
same	O
manner	O
by	O
using	O
the	O
DROP	O
SYNONYM	B-Application
command	O
,	O
but	O
there	O
is	O
one	O
important	O
difference	O
.	O
</s>
<s>
If	O
you	O
are	O
dropping	O
a	O
public	O
synonym	B-Application
;	O
you	O
need	O
to	O
add	O
the	O
keyword	O
PUBLIC	O
after	O
the	O
keyword	O
DROP	O
.	O
</s>
<s>
The	O
ALL_SYNONYMS	O
(	O
or	O
DBA_SYNONYMS	O
)	O
view	B-Language
provides	O
information	O
on	O
all	O
synonyms	B-Application
in	O
your	O
database	O
.	O
</s>
