Lewis, You got right Table design.
For more information about mapping object to data models see
http://www.rational.com/media/whitepapers/tp185.pdf

----- Original Message -----
From: "Lewis Lin" <[EMAIL PROTECTED]>
To: "Rose Forum (E-mail)" <[EMAIL PROTECTED]>
Sent: Wednesday, March 21, 2001 7:50 AM
Subject: (ROSE) Many to one relationship


>
> Hi,
>   I have an Address class that contain a Country class in Object Model.
>
> class Address {
> private Country country;
> }
>
> When I transfer this relationship to a data model. I got a wrong Table
> design.
>
> Table Address
> Address_ID:int
>
> Table Country
> Country_ID:int
> Address_ID:int (FK)
>
> shouldn't the FK exist in Address? Since I set the relationship between
> address and country in object model to many-to-one relationship?
>
> Thanks,
> Lewis Lin
> Fairway Financial Consulting
>
>
> ==========================================================
>  PC home �K�O�q�l�H�c�A�ӽнЦ�: http://www.pchome.com.tw
>  PC home Online �����a�x�@�@ �|���Ĥ@�A�x�W�̤j���J�f����
> ==========================================================
> ************************************************************************
> * Rose Forum is a public venue for ideas and discussions.
> * For technical support, visit http://www.rational.com/support
> *
> * Admin.Subscription Requests: [EMAIL PROTECTED]
> * Archive of messages:
http://www.rational.com/products/rose/usergroups/rose_forum.jtmpl
> * Other Requests: [EMAIL PROTECTED]
> *
> * To unsubscribe from the list, please send email
> *
> * To: [EMAIL PROTECTED]
> * Subject:<BLANK>
> * Body: unsubscribe rose_forum
> *
> *************************************************************************
>
>

************************************************************************
* Rose Forum is a public venue for ideas and discussions.
* For technical support, visit http://www.rational.com/support
*
* Admin.Subscription Requests: [EMAIL PROTECTED]
* Archive of messages: 
http://www.rational.com/products/rose/usergroups/rose_forum.jtmpl
* 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