Hide Oracle database link
from your user
There are 2 ways you can hide the complexity involved with Oracle database links from your user:
create a synonym or a view.
This will allow your user to access the data she needs without worrying
about the syntax requirements of database links.
Your user may even be unaware of the fact that she is accessing some data in a remote database.
Note:
Database links are notoriously slow, not an optimal solution for applications needing real-time response.
Expect the database link to cause a delay in accessing the remote data.
Here is an example of creating a synonym for scott’s database link.
SQL> create synonym rem_emp for emp@remotedb;
Synonym created.
SQL> select count(*) from rem_emp;
COUNT(*)
----------
14
The other method is to create a view on your remote database’s data.
SQL> create view v_emp as select * from emp@remotedb;
View created.
SQL> select count(*) from v_emp;
COUNT(*)
----------
14
Recommended reading:
Posted: October 23rd, 2009 under DB Links.
Tags: 2 ways, database note, hide oracle database link complexity, note database, optimal solution, select count, time response


