Database Reference
In-Depth Information
B
D
E
C
D
E
A
E
D
SELECT (EmpNo, EmpName, EmpPhone)
FROM EMPLOYEE, DEPARTMENT
WHERE EMPLOYEE.DeptNo
=
DEPARTMENT.DeptNo
AND DeptName
=
'Marketing';
LEGEND
D - Order File
E - Employee File
Vertical fragment
of File
Horizontal fragment
of File A
Full File
Figure 18-16
Query processing example.
the topic of distributed processing is beyond our scope. Nevertheless, you will survey
and learn the fundamental principles and concepts.
Query Processing
For the sake of simplicity, let us say that our tiny distributed database consists of
just the following two relations and the system comprises only three sites at A, B,
and C.
DEPARTMENT ( DeptNo , DeptName, DeptLocation, DeptManager)
EMPLOYEE ( EmpNo , SocSecNo, EmpName, EmpAddr, EmpPhone, Salary,
DeptNo)
Foreign Key: DeptNo REFERENCES DEPARTMENT
Figure 18-16 illustrates one version of the data distribution showing some frag-
ments and replicas at the three sites. Also, note the typical query.
Query Transformation Let us take a very simple query to list all the rows of the
DEPARTMENT relation, submitted by a user at site A.
SELECT *
FROM DEPARTMENT
How is this simple query processed? That depends on the fragmentation and
replication schemes used for distributing the data. Depending on the distribution,
the DDBMS must transform the query into subqueries, execute each subquery at
Search WWH ::




Custom Search