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
-- //www.freelists.org/webpage/oracle-l