Information Technology Reference
In-Depth Information
1.
find first N record by secondary indices IX
2.
get D j values, j = 1, 2,..n /* get referenced data */
3.
find next N record
4.
exit if none
5.
continue from 2
The syntax for the algorithm Project is:
Relational
Network
Exec SQL Declare C cursor
for
Select * from Table-T
End-Exec.
Obtain first N within IX.
If return-code 0
error-exit
else
Display N
Perform Loop until
end-of-record.
Exec SQL Open C
end-exec.
Exec SQL Fetch C into T.
Loop.
Obtain next N within IX.
Display N.
Display T.
Relational Operation Join
In the relational model, a join operation is allowed between two relations if the
joined attributes are compatible. Users may form joins from any two record types
in the network database. In general, the Join operation for two record types N i and
N k are as follows:
Algorithm Join
1. find first N i record by secondary indices IX i
2. exit if none
3. LOOP1: get referenced data item values in buffer
4. LOOP2: find N k record by secondary indices IX k
5. evaluate compatible attributes /* if f1 = v1 and f2 = v2 */
6. continue from 8 if evaluation fails
7. get referenced data item values /* obtain joined record */
8. find next N k record within secondary indices IX k
9. exit if none
10. continue from LOOP2
11. find next N i record within secondary indices IX i
12. exit if none
13. continue from LOOP1
Search WWH ::




Custom Search