Oracle7 Server Distributed Systems Volume I: Distributed Data

Contents Index Home Previous Next

Views and Location Transparency

Local views can provide location transparency for local and remote tables in a distributed system.

For example, assume that table EMP is stored in a local database. Another table, DEPT, is stored in a remote database. To make the location of, and relationship between, these tables transparent to users of the system, a view named COMPANY can be created in the local database that joins the data of the local and remote servers:

CREATE VIEW company AS 
	SELECT empno, ename, dname 
	FROM scott.emp a, jward.dept@hq.acme.com b 
	WHERE a.deptno = b.deptno; 

When users access this view, they do not know, or need to know, where the data is physically stored, or if data from more than one table is being accessed. Thus, it is easier for them to get required information. For example:

SELECT * FROM company; 

provides data from both the local and remote database table.

Figure 4 - 1 illustrates this example of location transparency.

Figure 4 - 1. Views and Location Transparency


Contents Index Home Previous Next