Information Technology Reference
In-Depth Information
Algorithm Update
1.
Set up position of target segment H.
2.
Set up new values of target segment H.
3.
Update target segment H.
The syntax for the algorithm Update is:
Relational
Hierarchical
Exec SQL Update
Table-T
set F1 = V1 and
F2 = V2 and
……
Fn = Vn
End-Exec.
Move Vk1 to Fk1.
Move Vk2 to Fk2.
……
Move Vkn to Fkn.
Exec DLI GHU using PCB(1)
Segment T
into Segment-area
where S1=Fk1
and S2=Fk2
and Sn=Fkn.
If return-code = space
Move V1 to F1
…..
Move Vn to Fn
Exec DLI REPLACE
else
error-exit.
Step 2. Processing hierarchical database DML.
The translated hierarchical database programs are now ready for processing. The
result of processing the translated hierarchical database program will be the same as
the result of processing the embedded-SQL program before translation. Similarly,
Fig. 5.6 shows (if we substitute all occurrences of “network” with “hierarchical”)
that even with the secondary indices added to the hierarchical database, the existing
hierarchical database program, after recompilation with the modified secondary-in-
dices-added hierarchical schema, can still access the modified hierarchical database
as it did before. As a result, the modified hierarchical DBMS acts as a relational
interface to the relational database program and as a hierarchical DBMS to the hier-
archical database program. The out-of-date hierarchical database programs should
be phased out or rewritten to the embedded-SQL programs.
Search WWH ::




Custom Search