(responding to Kathy Barrett)

> I am trying to understand how relationships are transformed
> from the Object Model to the Data Model (using an Oracle
> database).  My experience is in the relational world, and I'm
> new to Object, so please excuse my use of terminology.  
>
> Here is my example.  
> 
> I have two classes, Address and State.  In the object
> model, the relationship is from Address (parent) to State
> (child).  When code is generated, state is an attribute in the
> Address class.  This is what I expect.  
>
> When I transform the object model, a foreign key column
> (address_ID) is created on the state table.  This is not
> what I expected.  From a data model perspective, the
> parent in this relationship should be State, not Address. 
>
> Does a parent/child relationship have a different meaning
> in the object world?
>
> Is this a bug, or a lack of understanding on my part?  

This is down to a mis-match between the Object Oriented
approach and the Relational approach, and we all have 
to come across it at some time when storing Object data
into Relational databases.  The basic problem is that the
information to navigate the relationship is held at different
ends of the relationship in the two models.  Where an
Object may have a vector of references to its 'parts',
in the Relational model, each 'part' keeps a foreign key
to its 'holder'.

It looks like Rose has done a lot of the work here for you,
and what it has done is correct from what you say.

What I've said here is a very simplified explanation, I'd
recommend finding out a bit more on the Relational 
model when you have the chance.

Paul Oldfield

any opinions expressed herein are not necessarily those of
Mentors of Cally
************************************************************************
* Rose Forum is a public venue for ideas and discussions.
* For technical support, visit http://www.rational.com/support
*
* Post or Reply to: [EMAIL PROTECTED]
* Subscription Requests: [EMAIL PROTECTED]
* Archive of messages:
*    http://www.rational.com/support/usergroups/rose/rose_forum.jsp
* Other Requests: [EMAIL PROTECTED]
*
* To unsubscribe from the list, please send email
*    To: [EMAIL PROTECTED]
*    Subject: <BLANK>
*    Body: unsubscribe rose_forum
*************************************************************************

Reply via email to