Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Multiple object references in Oracle 9i
Hello all,
Just wondering whether it is possible to make a multiple reference from one
object to many objects?
The thing I'm trying to do is to create a reference from one of the
"student" objects to several "course" objects (that is to reconstruct the
model where one student takes many courses).
I'm trying to do it using "varray" as follows:
CREATE OR REPLACE TYPE Stud_reftype AS VARRAY(70) OF REF Studenttype;
CREATE TABLE COURSE (
CourseNr INTEGER primary key,
Title VARCHAR(30),
Hours INTEGER,
Stud_ref Stud_reftype REFERENCES Student);
(Studenttype is the type of the table student.)
Any suggestions of how to implement it correctly?
Thanks a lot,
Roman Zhovtulya
Received on Wed Dec 04 2002 - 12:05:18 CST
![]() |
![]() |