Hi,

I have some questions regarding EJB2.0 specifications,
as per proposed final draft.

1. The spec says that dependent object can be shared
accross relationships. In section 9.4.6.2 example is
given for an Address dependent object which is shared
by two relationships, billing address and shipping
address form an Order Bean. Both these relationships
are one to one.

For such a scenario I was trying to do a database
design. I will have two tables, one for Order bean and
one for storing addresses. Since address is a
dependent, I will have PK of order table as Foreign
key in address table.

But for the above two relationship discussed, a
possible database design will be :

Order table having two Foreign Keys to address table.
One foreign key in order table will be for shipping
address, and other foriegn key in order table for
billing address.

Order Table : orderID, billingAddressId,
shippingAddressId.

Address Table : AddressId.

I think that at the database level it is rather a poor
design. If address is a dependent entity, it should
contain the foregn key(OrderId) pointing to the PK of
order table.

Can anyone suggest me where I am going wrong ????

2. Accoeding to enb2.0 spec, a dependent object can be
shared accross multiple entities. Lets say a customer
and employee sharing same dependent object. (Of course
all are in the same jar.)

How will someone model such a relationship at the
database level ?
What can be a possible database schema if the employee
is having two relationship for eg present address and
permanent address with the Address dependent Object ?


Am i missing any point ?

Regards,
Thik


__________________________________________________
Do You Yahoo!?
Yahoo! Calendar - Get organized for the holidays!
http://calendar.yahoo.com/

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to