Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Multiple object references in Oracle 9i

Multiple object references in Oracle 9i

From: Roman Zhovtulya <roman_at_fh-offenburg.de>
Date: Wed, 4 Dec 2002 19:05:18 +0100
Message-ID: <aslg2n$el3$1@news.BelWue.DE>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US