Yes,
An entity bean is very expensive. It is a remote object and contains heavy
transaction logic. should only be used when you need a remote interface
I would have entity beans reflect the data in Table1.
these entity beans could also contain the logic of inserting, reading and
updating data in table2 and table3. This data would be regular java
objects.
So in the entity bean for table1 I would have
Vector getTable2Data(...)
void deleteTable2Data(table2RowObject)
void addTable2Data(table2RowObject)
This way the main entity bean is in charge of the data in table2 and 3 and
you can control you database access in a better way.
Let me know if you want a more detailed description.
Filip Hanik
Verge Softawre
Sanjay Nambiar
<[EMAIL PROTECTED]> To: [EMAIL PROTECTED]
Sent by: A cc:
mailing list for Subject: A question about one to many
relationships among tables
Enterprise
JavaBeans
development
<EJB-INTEREST@jav
a.sun.com>
11/17/99 03:33 AM
Please respond to
A mailing list
for Enterprise
JavaBeans
development
Hi,
Our application typically has the following scenario:
1>For Every Record of Table1 we have multiple records in Table2,in turn
whose every record has multiple records in Table3.
As the data volumes are very high,I wanted to know if the approach given
below is right
In the entity bean of Table 1 we have an extra attribute of say "Vector
type" which would contain the bean references of all the entitybeans
corresponding to Table 2.The same is done for the relationship between
table
2 and table 3
In the entityBean for Table 1 we query the Table 2 and populate the
entitybean instances of Table 2 from Table 1 entitybean itself and store
the
bean references in the Vector and then this Table 1 entitybean is accessed
from the sessionbean for all the records.
EJBServer supports bean managed persistence and the database is Informix
Any comments ....or an alternative better approach
SANJAY Nambiar
===========================================================================
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".
===========================================================================
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".