Information Technology Reference
In-Depth Information
end
i>j>1: begin /* set up parentageposition*/
Get next within parent H
ij
segment;
If segment found
then Let j = j + 1 /*go down toward target segment*/
else Let j=j-1; /* go up toward root segment */
end;
j=i: begin /* process target segment */
whileH
ii
segment founddo
begin
Getnextwithin parent H
ii
segment; /*set up parentage*/
case H
ii
segment identifier type of
“F”: output H
ii
segment with itsparent segment
keys H
m
to sequential file i;
/*H
m
=the concatenationof parent
segment keys of H
i
segment*/
“P”: output H
ii
segment alongwithH
i1
(key),
H
i2
(key)…H
i(i-1)
(key),H
ii
(key) to sequential file i;
“I”: output H
i1
segment alongwithH
i1
(key),
H
i2
(key)……H
i(i-1)
(key),.sequence# to sequential file i;
case-end;
while-end;
Let j=j-1; /* go up toward root segment */
end;
case-end;
while-end;
for-end;
end;
Step 2—(Optional) Transfer sequential file to a target computer.
Step 3—Upload sequential files to the relational database.
4.7
Data Conversion from Relational to Object-Oriented
Similar to the procedure for data conversion from network to relational, we must
perform schema translation from relational to object-oriented in preprocess, and
then unload and upload the relational database to a target object-oriented database
as shown in Fig.
4.10
.
There are four steps in converting data from relational to object-oriented. They
are:
Preprocess step 1—Translate relational schema into an object-oriented schema
Rule 1: Map Relation to Class Object
This rule maps relations into class objects. The resulting classes contain all the at-
tributes of the source relations.
Search WWH ::
Custom Search