Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Integrity constraint with jointure
Hello,
I would like to add an integrity constraint on one of my tables, but it looks like I need to create a join for that. I would like to have any feed back on how to do it, or why the design is bad, and how to change to a better one...
create table Teams (
KeyTeam number primary key
);
create table Paths (
NickName varchar(100) not null,
KeyTeam references Teams not null,
Path varchar(500),
constraint primary key (NickName, KeyTeam)
);
create table Users (
KeyUser number primary key,
KeyTeam references Teams not null
);
create table Tasks (
KeyUser references Users not null,
NickNameOfPath varchar(100)
);
The Tasks table references the Paths table, but the foreign key is the team of the user, not the user. So I dont know how to define this relation...
Thank you
-- VincentReceived on Tue Oct 26 2004 - 10:26:55 CDT
![]() |
![]() |