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 -> Re: Search on Child Record Set

Re: Search on Child Record Set

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Thu, 03 Dec 1998 02:39:06 GMT
Message-ID: <3671f952.10169933@192.86.155.100>


A copy of this was sent to "Neil Hulin" <nospam@*NOSPAM*litech.freeserve.co.uk> (if that email address didn't require changing) On Wed, 2 Dec 1998 14:38:16 -0000, you wrote:

>I was not attempting to indicate that Thomas's code was
>wrong as it solves the problem but, more to the point, the
>representation of the data is wrong and therefore the
>solution that is proposed is irrelevant.
>

irrelevant :)

it solved the problem -- however, its irrelevant :)

>Thomas resolves the data representation thus:
>:I have 2 tables:
>:
>:create table emp( empno number primary key,
>: .... other emp data like names and stuff
>... );
>:
>:create table emp_skill ( empno number,
>: skill varchar(n),
>: primary key(empno, skill_code),

                                              ^^^^^^^^^^^ sorry typo, should
                                              have just been SKILL as there is
                                              no friggin column skill_code in 
                                              my table.

>: foreign key(empno) references
>emp(empno) );
>:
>:(seems logical to me given the information above -- and by
>the way, this does
>:NOT preclude emp_skill from being an intersection table to
>a skills table with
>:more information about skills does it. rhetorical question)
>
>This may seem logical but we have here an attribute, skill
>varchar(n), of emp_skill that is not solely dependent on the
>primary key (empno#,skill_code#) of the entity that
>contains it. This is not a correct relation. Therefore we
>should discount this representation and seek one that truly
>reflects the situation.
>

due to a typo, i now see why you are confused. pardon my typo. it should have been SKILL in the primary key and thus, the relation is 'correct'.  

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Herndon VA

--
http://govt.us.oracle.com/ -- downloadable utilities  



Opinions are mine and do not necessarily reflect those of Oracle Corporation  

Anti-Anti Spam Msg: if you want an answer emailed to you, you have to make it easy to get email to you. Any bounced email will be treated the same way i treat SPAM-- I delete it. Received on Wed Dec 02 1998 - 20:39:06 CST

Original text of this message

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