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

Home -> Community -> Mailing Lists -> Oracle-L -> The Third Manefesto

The Third Manefesto

From: Henry Poras <henry_at_itasoftware.com>
Date: Wed, 20 Jul 2005 02:17:18 -0400
Message-ID: <42DDEC6E.1000804@itasoftware.com>


I'm almost done reading Date's book. I have a bunch of questions and need to reread and think about a number of sections. There is one basic question, though, where I am convinced I must be missing something.

How do you apply Foreign Keys if relations are defined using relational types?

One example given by Date is logically representing employee data either in a relation variable (EMP) with attributes empno, ename, deptno, ... OR by defining a type emp(empno, ename, deptno, ...). This type is then the data type (domain) of an EMP relvar. The second relation is thus effectively a set of employee objects.

I see how joins can be done in the second case (use a built-in funtion THE_DEPTNO(emp) which will extract the deptno value from each tuple), but what about a foreign key on DEPTNO?

If I read this in the morning and the question is as unclear as I suppose it is, I'll expound on this.

Henry

--
http://www.freelists.org/webpage/oracle-l
Received on Wed Jul 20 2005 - 01:20:17 CDT

Original text of this message

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