Class vs table design
From: John O'Conner (jsoconner_at_earthlink.nospam.net)
Date: 01/29/04
- Previous message: Ang: "How to restrict the connection for certain application but not everyone ?"
- Next in thread: Bjorn Abelli: "Re: Class vs table design"
- Reply: Bjorn Abelli: "Re: Class vs table design"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 29 Jan 2004 10:03:16 GMT
Hi all,
I'm working on a project for my son's Little League. In designing the
app, I've created several Java business objects with the following
relationships:
Every PARTICIPANT has one or more ROLES in the LEAGUE. They can be a
PLAYER, MANAGER, COACH, GUARDIAN (a parent, aunt, or uncle), etc.
One problem I'm having is understanding whether Guardians should be a
property of a Player or not. The alternative is an intermediate object
that relates Players to Guardians.
I seem to have this problem often. That is, it seems quite difficult at
times to decide whether an attribute of an object is really an attribute
or a separate object that is tied to the orginal object through a
relationship.
I suspect that this problem is created when I try to think about the
relational table design at the same time I'm designing the Java classes.
Is this a common problem? How do you resolve these types of questions?
Regards,
John
- Previous message: Ang: "How to restrict the connection for certain application but not everyone ?"
- Next in thread: Bjorn Abelli: "Re: Class vs table design"
- Reply: Bjorn Abelli: "Re: Class vs table design"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]