Database Reference
In-Depth Information
PatientNo
1134
1389
2107
2298
2576
3158
3255
3380
4157
6199
PatientName
Bruce Greenberg
Sheryl Rodericks
Miranda Poko
Pedro Pomales
Bob Totten
Peter Tora
Gary Goran
Pia Dorsey-Adams
Anthony Brett
Milton Kalma
DateAdmit
2-Jan
10-Jan
22-Jan
2-Feb
11-Feb
14-Feb
6-Mar
15-Mar
22-Apr
25-Apr
DateDischarged
11-Jan
26-Jan
1-Feb
18-Feb
25-Feb
14-Mar
10-Mar
22-Apr
24-Apr
27-Apr
PATIENT
Relation
PatientNo
1389
2298
3158
3380
PatientName
Sheryl Rodericks
Pedro Pomales
Peter Tora
Pia Dorsey-Adams
DateAdmit
10-Jan
2-Feb
14-Feb
15-Mar
DateDischarged
26-Jan
18-Feb
14-Mar
22-Apr
Result of
SELECT
operation
DateDischarged
11-Jan
26-Jan
1-Feb
18-Feb
25-Feb
14-Mar
10-Mar
22-Apr
24-Apr
27-Apr
PatientName
Bruce Greenberg
Sheryl Rodericks
Miranda Poko
Pedro Pomales
Bob Totten
Peter Tora
Gary Goran
Pia Dorsey-Adams
Anthony Brett
Milton Kalma
Result of
PROJECT
operation
Figure 8-10
Relations for SELECT and PROJECT operations.
ASSIGNMENT
UNION
INTERSECTION
DIFFERENCE
PRODUCT
JOIN
DIVIDE
Let us examine each of these operations with the aid of examples. To study the
following three operations, we will use the relations or tables shown in Figure 8-10.
Select
Features and function
Operates on a single relation.
Selects specific rows from a relation on the basis of given criteria.
The result is a relation containing rows and columns as indicated below:
Rows—only the selected rows from the original relation
Columns—same columns as in the original relation
Search WWH ::




Custom Search