|
No, Each employee is associated with only one
company - one company is associated with several employees. The employee
will have a foreign key to the company. If you want to go in the opposite
direction, you just fire a select statement on the employee again and get all
of the employees referring to the same company. Regards, Davor Gornik -----Original Message----- Hi, all I have a question related to the
mapping of object model to data model: For instance, class Employee
and class Company have many-to-one bi-directional relationship, the
class definitions are: Class Employee { ... public Company company; ... } Class Company ... public Vector employees; ... } Now if I map this class diagram to a
data model, should table Employee have a foreign key referring to a record in
Company table and also Company table has a foreign key with reference to a row
in Employee table to reflect the bi-directional association? Thanks Jie |
- (ROSE) Mapping from Object Model to Data Model Jie Zhao
- Gornik, Davor
