Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using Biz Objects
Message
From
16/09/2004 16:15:06
 
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00942933
Message ID:
00943096
Views:
15
>PLAYERS
>Fred Bloggs id 1 season id 1
>John Smith id 2 season id 1
>Fred Bloggs id 3 season id 2
>John Smith id 4 season id 2
>
>My question is how to best organise this?
>
>In the Season biz object's save method I test to see if we are saving a new record, if we are, I need to call out someplace in order to create a series of player records via the players / team member biz object.
>
>The problem is where does this code live, in the season object or the player object
>
>Do I place code in the season object that make use of the player object in order to create the records or do I call out from the season object to a special method of the player object that does all the work.

Well, from an efficiency standpoint, you'd probably be best to do it in three tables, SEASONS, PLAYERS, and PLAYERSEASONS. This way, you have only one copy of any given player, and you're only adding PlayerSeasons every year. If it's just (PlayerID, SeasonID), I'm sure one of the gurus around here can write you a one line SQL that'll add all the players to a new season at one shot.

Seasons should call Players (or PlayerSeasons) and have it actually add the necessary records. If Players is designed to use one player at a time, the loop should be in Seasons.

Chris.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform