| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Transitive Closure with XDb1
> > [person isA thing. john isA person. mary isA person. planet isA thing.
> > mars isA planet. venus isA planet. universe isa thing. mars isPartOf
> > universe. john isPartOf mars. venus isPartOf universe. mary isPartOf venus.]
> > Could you show RDM's "declarative" equivalent?
> Paul said:
> create table Contains (whole char, part char)
> insert into Contains values ('mars', 'john')
> insert into Contains values ('venus', 'mary')
> insert into Contains values ('universe', 'mars')
> insert into Contains values ('universe', 'venus')
The above is partially equivalent. First, XDb1's declarations result in a normalized schema/structure thus there is only one Mars which participates in a variable number of relationships. In the above RDM declarations, each person and planet is redundant/unnormalized. Changing the spelling of either Mars results in data corruption. Second, John and Mary need to be "classified" by inserting in T_Person. Mars and Venus need to "classified" by inserting into T_Planet. Then the keys of planets and persons need to related to records in T_Contains. Leandro could you show RDM's declarative equivalent? Received on Wed May 12 2004 - 15:22:49 CDT
![]() |
![]() |