Information Technology Reference
In-Depth Information
ClassEnrol
attr year integer
attr grade: string
association attr register ref graduate_student
association attr provide ref section
end
Step 2—Unload data into sequential files.
By applying the algorithm specified, this step unloads data from each relation
into a sequential file along with its association data from other relations.
The idea is to load the attribute data from the input relation, and the association
attribute data from the loaded object-oriented database. The Select statement is to
retrieve class occurrences that have been loaded into the object-oriented database
with the stored OID. The association attributes are in italic.
For implementation, a foreign key will be loaded with referred data using the
stored OID. The insert and select statements in the following are from a prototype
written using UniSQL (UniSQL 1993 ).
The content of file F i after the first substep in unload process are the following
insert statements:
insert
into
student
(student#,
student_name,
sex)
values
('012888', 'Paul Chitson', 'M')
insert
into
student
(student#,
student_name,
sex)
values
('120008', 'Irene Kwan', 'F')
insert
into
student
(student#,
student_name,
sex)
values
('117402', 'John Lee', 'M')
insert into graduate_student (student#, degree_to_be, register )
values ('012888', 'M.Sc.', null)
insert into graduate_student (student#, degree_to_be, register )
values ('120008', 'Ph.D.', null)
insert into section (section#, lecture_hour, taught_by, divide,
provide ) values (1, 30, null, null , null )
insert into section (section#, lecture_hour, taught_by, divide,
provide ) values (2, 30, null, null, null )
insert into enrol (year, grade, register_by ,
provide_by ) values
(1995, 'A', null, null )
hinsert into enrol (year, grade, register_by, provide_by ) values
(1996, 'B', null, null )
insert
into
instructor
(inst_name,
ss#,
inst_addr)
values
('A.B.Adams', 415223641, 'White Plains')
Search WWH ::




Custom Search