Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Unique REF Cursor
Yea, using simple relational tables ;) In a learning process probably
object tables is OK, but for real apps I strongly suggest you not to
use them. Internally all these are relational tables anyway just with
some superstructure that definitely doesn't make things faster and you
have less control over it, too.
see
http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:2318607631616
and
http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:1545206281987
Gints Plivna
http://www.gplivna.eu/
e.cunibil_at_gmail.com wrote:
> Hello,
>
>
> I am an IT Student and we learn using Oracle.
> I have a little problem with a REF I want to be unique.
> Let see my problem :
>
> CREATE TYPE T_Group AS object (
> groupName VARCHAR2(30)
> );
> CREATE TYPE T_People AS object (
> num INTEGER,
> name VARCHAR2(30)
> );
> CREATE TYPE T_Student AS object (
> whoIs REF T_People,
> studentGroup REF T_Group
> );
>
> CREATE TABLE Group OF T_Group (
> CONSTRAINT pk_group PRIMARY KEY (groupName)
> );
> CREATE TABLE People OF T_People (
> CONSTRAINT pk_people PRIMARY KEY (num)
> );
> CREATE TABLE Student OF T_Student (
> CONSTRAINT un_whois_student UNIQUE(whoIs),
> CONSTRAINT notnull_group_student CHECK (studentGroup IS NOT NULL)
> );
>
>
> Unique constraint are forbidden on REF fields so do you know a way to
> make this field unique ?
>
>
> Thanks a lot !
Received on Fri Jun 16 2006 - 07:36:46 CDT
![]() |
![]() |