At 10:45 AM 8/13/99 -0400, you wrote:
>Fund as an Entity Bean
>======================
>This didn't seem prudent as the Fund object doesn't represent a row in a
>database. Furthermore, a user will create a new Fund by creating a new
>FundDetail (with a year). If Fund was an entity with it's own database
>table, I would have to enforce referential integrity in my FundDetail's
>ejbCreate and ejbRemove methods which seems, at the very least, a great
>performance drag. Is there a way for Fund to be an Entity without its own
>database table?

It would be helpful from both a relational and OO perspective if your table
was normalized into two tables: FUND (ID, DESCRIPTION) with Primary Key ID,
and FUNDDETAIL (ID, YEAR, APPAMT, OBLAMT, DESCRIPTION) with Primary Key ID
+ YEAR, and a Foreign Key reference to FUND.

This makes it more clear that both FUND and FUNDDETAIL are entities (An
entity is anything which is persistent and persistently identifiable).

I wouldn't sweat the preformance drag.  It's a small price to pay for a
properly factored object and/or relational model.

But I would implement FUND as an entity even if I didn't normalize the
underlying relational structure.  You may have to use BMP to do it, but
that's not a big problem.

>
>Fund as a Stateless Session Bean
>================================
>This is the way I am leaning right now. The user would request the AppAmt
>for a Fund, and a database query would result in the correct summary
>information. It just seems kludgy to me, since the table is not normalized
>at the fund level, and a change to description would result in a multiple
>row update.
>
>Fund as an Entity, FundDetail as a dependent
>=============================================
>A little more radical. I would be responsible for syncing the FundDetail
>object. I could still use the FundDetail table, and CMP would be out of the
>question.
>
>I'd be interested in other options as well. What do you think?
>
>jim
>
>===========================================================================
>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".
>

Steve Demuth

Director of Technology Research
Artemis Alliance, Inc.          An Inprise Premier Partner
2750 Lannon Hill Road
Decorah, Iowa  52101
651-227-7172 (Typically Mon-Tue) or 319-382-0593 (Wed-Fri)

===========================================================================
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