Information Technology Reference
In-Depth Information
The syntax for the algorithm Join is:
Relational
Network
Exec SQL Declare C
cursor for
Select F1, F2….Fn
from Table-T1,
Table-T2.
End-exec.
Find first N i record within IX i .
Find first N k record within IX k .
If record-found
perform LOOP1 until
end-of-record.
LOOP1.
If f1=v1 and f2=v2
Obtain N i record
Obtain N k record.
Perform LOOP2 until
end-of-record.
Find next N i record within IX i .
Exec SQL Open C
end-exec.
Exec SQL Fetch C into
T end-exec
LOOP2.
Find next N k record within IX k .
If f1=v1 and f2=v2
Obtain N i record
Obtain N k record.
Relational Operation Insertion
Attribute values are specified for a tuple to be inserted in a relation R k . We denote
by v 1 , v 2 …. v n the values for attributes corresponding to fields in N k and with V 1 , V 2
… V f the values of the foreign keys in R k .
Algorithm Insertion
1. locate the owner record type N k-1 of to-be-inserted record N k
within secondary indices IX k-1 using ID k-1. /* ID k-1 = record
identifier value in IX k-1 */
2. locate to-be-inserted record types N k within secondary indices
IX k using ID k ./* ID k is the record identifier value in IX k */
3.
Establish contents of all N k record data items in working
storage (v 1 ,v 2…. v n, V 1, V 2… V f ).
4.
store N k record
5.
connect N k record to all owners record N k-1 in manual sets that
have been established its currency in 2.
Search WWH ::




Custom Search