Team Player Design Project SE 512 Winter 1989 14 March 1989 Section 1 INTRODUCTION 1.1 Definition Team Player is an on-line system to support rotisserie baseball leagues formed by sports enthusiasts. A rotisserie league is a simulated baseball league in which a group of people, participating in a pool, choose teams consisting of professional baseball players. A draft is held yearly and each participant sets up their own team (one or more players at each position and several pitchers). Team Player allows league creation, league modification, statistical tracking, and report generation on an IBM PC or true compatible. 1.3 Scenario After the draft has been held, the administrator sets up the league via on- line entry screens. The information captured for the entire league includes league name, point distributions (defaults can be used), and the number of players allowed at each position. Next, information on individual teams is entered, teams being identified by team name and owner name. The drafted players are assigned to their individual teams and given a playing position. Once all the teams have been set up, year-to-date (YTD) statistics are gathered for all players. Statistics can be input to Team Player either automatically or manually. For automatic input, the administrator downloads the YTD statistics from an on-line service such as CompuServe to a text file that is read by Team Player. If done manually, the software will present screens for all players whose statistics are being kept. The administrator will enter values as shown weekly in the newspaper sports section, and the software will write these values to a text file read by Team Player. Section 2 REQUIREMENTS SPECIFICATION 2.1 Product Requirements This section specifies the general requirements for Team Player. Team Player will: P-L-+---T1----+-T--2----T----3--T-+----4T---+---T5----+-T--6----T----7--T-+--R * handle all league transactions and provide means for storage of league data * provide menu driven, user friendly screens * provide on-line forms for manual entry of weekly player statistics * allow automatic entry of weekly player statistics downloaded to a text file from a sports information service such as CompuServe * allow manual entry and modification of league data * provide access and browse of text file for league rules and tutorial * assign points for each league structure * calculate weekly point totals * generate reports L---+---T1----+-T--2----T----3--T-+----4T---+---T5----+-T--6----T----7--T-+--R 2.2 Context Diagram The Context Diagram for Team Player is shown in Figure 1. The main source/sink is the baseball fan who provides all information necessary to configure the league and who receives reports from the system. Professional baseball statistics are input to the system either manually from information taken from the newspaper, or automatically downloaded from a sports information service such as CompuServe. 2.3 Level 0 Data Flow Diagram The Team Player Level 0 DFD identifies the three main processes that make up the system. Each process is reviewed in the following section. 2.4 Process Specifications Process 1.0 - Configure League: This process handles all of the functions associated with setting up and modifying league setups. If a user is setting up a new league this process steps the user through all the steps required to input the required configuration data. This data is then stored in the league and team files. If the user is modifying an existing league then the program prompts the user through selecting what they want modified and inputs the changes to the league or team configuration. PROCESS SPEC: Process 2.0 - Update Stats: The purpose of this module is to update the all_players ytd_stats file and calculate the weekly statistics. The weekly statistics are input by the user either by prompting the user thru a manual update or by reading in a DOS file full of the statistics and automatically doing the update. After the update has been completed the league weekly points are calculated. PROCESS SPEC 2: 2.1 Get league name and update choice 2.2 Move this weeks all_players_ytd_stats to previous week 2.3 If update choice is manual then do Step user thru data entry for each player assigned To a team and store information in All_players_ytd_stats Else Do an automatic update by getting a dos file name From user and read in statistics from the file. Store new statistics in all_players_ytd_stats. 2.4 Calculate the weekly point totals for each player and store in league weekly points Process 3.0 - Generate Reports: This procedure allows the user to select a desired item to be reported on and outputs the desired information. The possible reports to be selected are YTD league report, weekly league report, YTD team report, weekly team report, player ranking, and pro player statistics. PROCESS SPEC: 3.1 PROMPT USER FOR REPORT SELECTION 3.2 IF SELECTION IS YTD LEAGUE REPORT THEN GET LEAGUE NAME GET TEAMS ON THE LEAGUE OUTPUT YTD POINTS FOR THE LEAGUE 3.3 IF SELECTION IS WEEKLY LEAGUE REPORT THEN GET LEAGUE NAME GET TEAMS ON THE LEAGUE OUTPUT WEEKLY TOTALS FOR THE LEAGUE 3.4 IF SELECTION IS YTD TEAM REPORT THEN GET TEAM NAME OUTPUT YTD TOTAL FOR TEAM 3.5 IF SELECTION IS WEEKLY TEAM REPORT THEN GET TEAM NAME OUTPUT WEEKLY TOTAL FOR TEAM 3.6 IF SELECTION IS PLAYER RANKING OUTPUT EACH PLAYERS POINT TOTALS STARTING WITH THE PLAYER WITH THE HIGHEST POINT ALL THE WAY DOWN TO THE PLAYER WITH THE LOWEST POINTS. 3.7 IF SELECTION IS PRO PLAYER STATISTICS OUTPUT ALL PLAYERS STATISTICS IN YTD PLAYER STATS. Section 3 DATA DEFINITIONS 3.1 Data Dictionary This section includes the Team Player Data Dictionary in DeMarco notation. LEAGUE_CONFIGURATION = {league_name + league_values + {team_name + owner + {player_name + position}}} PLAYER_LIST = {p-id + player_name + position} ÄÄÄÄ PRO_TEAM_LIST = {pt-id + pro_team_name} ÄÄÄÄÄ TEAM_FILE = {t-id + team_name + owner + league_name} *t-id is unique ÄÄÄÄ TEAM_PLAYER_FILE = {t-id + p-id} ÄÄÄÄ ÄÄÄÄ ALL_PLAYERS_YTD_STATS = {p-id + position + pt-id + player_stats} ÄÄÄÄ alias: professional_statistics PLAYER_STATS = {sp_stats | rp_stats | bt_stats} SP_STATS = {wins + losses + earned_runs + innings + complete_games + strike_outs + walks} * starting pitcher * RP_STATS = {wins + losses + earned_runs + innings + saves + strike_outs + walks} * relief pitcher * BT_STATS = {singles + doubles + triples + home_runs + runs_scored *batter * + runs_batted_in + stolen_bases} POSITION = | relief_pitcher = 0 | | starting_pitcher= 1 | | first_base = 2 | | second_base = 3 | | third_base = 4 | | catcher = 5 | | short_stop = 6 | | left_field = 7 | | right_field = 8 | | center_field = 9 | LEAGUE_ATTRIBUTES = {league_name + league_values} ÄÄÄÄÄÄÄÄÄÄÄ LEAGUE_VALUES= point_values_rules + no_pitchers + no_relievers + no_batters POINT_VALUES_RULES = rules_for_starting_pitchers + rules_for_relief_pitchers + rules_for_batters * point values rules for each league * RULES_FOR_STARTING_PITCHERS = points-for-win-p + points_for_losses-p + points_for_earned_runs_p + points_for_innings_p + points_for_complete_games_p + points_for_strikeouts_p + points_for_walks_p RULES_FOR_RELIEF_PITCHERS = points-for-win-r + points_for_losses-r + points_for_earned_runs_r + points_for_innings_r + points_for_saves + points_for_strikeouts_r + points_for_walks_r RULES_FOR_BATTERS = points_for_singles + points_for_doubles + *all other* points_for_triples + points_for_home_runs + *positions* points_for_runs_scored + points_for_runs_batted_in + points_for_stolen_bases LEAGUE_WEEKLY_POINTS= {t-id + p-id + week + point_totals} ÄÄÄÄ ÄÄÄÄ ÄÄÄÄ * details of points for each player for each week * POINT_TOTALS = {sp_totals | rp_totals | bt_totals} SP_TOTALS = {wins_points_p + losses_points_p + earned_runs_points-p + *starting innings_points_p + complete_games_points + strike_outs_points_p + pitcher* walks_points_p} RP_TOTALS = {wins_points_r + losses_points_r + earned_runs_points-r + *relief innings_points_r + saves_points + strike_outs_points_r + pitcher* walks_points_r} BT_TOTALS = {singles_points + doubles_points + triples_points + *batter* home_runs_points + runs_scored_points + runs_batted_in_points + stolen_bases_points} 3.3 Data Item Definitions Data Items are defined as follows: ANY_BINARY = [1|2|3|4|.....|256] ANY_CHARACTER = [A|B|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z| |] ANY_DIGIT = [1|2|3|4|5|6|7|8|9|0] COMPLETE_GAMES = 1{any_digit}2 COMPLETE_GAMES_POINTS = any_binary DOUBLES = 1{any_digit}2 DOUBLES_POINTS = any_binary EARNED_RUNS = 1{any_digit}2 EARNED_RUNS_POINTS_P = any_binary EARNED_RUNS_POINTS_R = any_binary HOME_RUNS = 1{any_digit}2 HOME_RUNS_POINTS = any_binary INNINGS = 1{any_digit}2 INNINGS_POINTS_P = any_binary INNINGS_POINTS_R = any_binary LEAGUE_NAME = 1{any_character | any_digit}15 LOSSES = 1{any_digit}2 LOSSES_POINTS_P = any_binary LOSSES_POINTS_R = any_binary NO_BATTERS = any_binary NO_PITCHERS = any_binary NO_RELIEVERS = any_binary OWNER = 1{any_character}25 P-ID = 1{any_binary}2 PLAYER_NAME = 1{any_character}25 POINTS_FOR_COMPLETE_GAMES_P = any_binary POINTS_FOR_DOUBLES = any_binary POINTS_FOR_EARNED_RUNS_P = any_binary POINTS_FOR_EARNED_RUNS_R = any_binary POINTS_FOR_HOME_RUNS = any_binary POINTS_FOR_INNINGS_P = any_binary POINTS_FOR_INNINGS_R = any_binary WALKS = 1{any_digit}2 POINTS_FOR_LOSSES_P = any_binary WALKS_POINTS_P = any_binary POINTS_FOR_LOSSES_R = any_binary WALKS_POINTS_R = any_binary POINTS_FOR_RUNS_BATTED_IN = any_binary WEEK = any_binary POINTS_FOR_RUNS_SCORED = any_binary WINS = 1{any_digit}2 POINTS_FOR_SAVES = any_binary WINS_POINTS_P = any_binary POINTS_FOR_SINGLES = any_binary WINS_POINTS_R = any_binary POINTS_FOR_STRIKEOUTS_P = any_binary POINTS_FOR_STRIKEOUTS_R = any_binary POINTS_FOR_TRIPLES = any_binary POINTS_FOR_WALKS_P = any_binary POINTS_FOR_WALKS_R = any_binary POINTS_FOR_WIN_P = any_binary POINTS_FOR_WIN_R = any_binary PRO_TEAM_NAME = 1{any_character}25 PT-ID = any_binary RUNS_BATTED_IN = 1{any_digit}2 RUNS_BATTED_IN_POINTS = any_binary RUNS_SCORED = 1{any_digit}2 RUNS_SCORED_POINTS = any_binary SAVES = 1{any_digit}2 SAVES_POINTS = any_binary SINGLES = 1{any_digit}2 SINGLES_POINTS = any_binary STOLEN_BASES = 1{any_digit}2 STOLEN_BASES_POINTS = any_binary STRIKE_OUTS = 1{any_digit}2 STRIKE_OUTS_POINTS_P = any_binary STRIKE_OUTS_POINTS_R = any_binary T-ID = any_binary TEAM_NAME = 1{any_character | any_digit}15 TRIPLES = 1{any_digit}2 TRIPLES_POINTS = any_binary 3.4 Overview of Data Stores The data stores for Team Player are shown here. L---+---T1- -T--2----T----3--T-+----4T---+---T5----+-T--6- R PLAYER_LIST ÚÄÄÄÄÄÄÒÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄ¿ ³ p_id º player_name ³ position ³ ÃÄÄÄÄÄÄ×ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄ´ ³ 1 º Alvin Davis ³ 3 ³ ³ 2 º George Brett ³ 5 ³ ³ 3 º Mickey Mantle ³ 8 ³ ³ 4 º Willie Mays ³ 8 ³ ÀÄÄÄÄÄÄÐÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÙ ÚÄÄÄÄÄÒÄÄÄÄÄÄÄÄÂÄÄÄÄÄÂÄÄÄÄÄÂÄÄÄÄÄÂÄÄÄÄÄÂÄÄÄÄÄÂÄÄÄÄÄÂÄÄÄÄÄÂÄÄÄÄÄ¿ ³p_id ºposition³pt_id³stat1³stat2³stat3³stat4³stat5³stat6³stat7³ ÃÄÄÄÄÄ×ÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄ´ ³ 273 º 2 ³ 8 ³ 98 ³ 40 ³ 2 ³ 15 ³ 82 ³ 67 ³ 1 ³ ³ 49 º 4 ³ 7 ³ 31 ³ 28 ³ 8 ³ 34 ³ 144 ³ 101 ³ 0 ³ ³ 651 º 5 ³ 13 ³ 150 ³ 47 ³ 2 ³ 8 ³ 71 ³ 107 ³ 0 ³ ³ 35 º 1 ³ 13 ³ 24 ³ 4 ³ 90 ³ 250 ³ 12 ³ 205 ³ 100 ³ ³ 22 º 0 ³ 24 ³ 5 ³ 5 ³ 50 ³ 80 ³ 12 ³ 40 ³ 25 ³ ÀÄÄÄÄÄÐÄÄÄÄÄÄÄÄÁÄÄÄÄÄÁÄÄÄÄÄÁÄÄÄÄÄÁÄÄÄÄÄÁÄÄÄÄÄÁÄÄÄÄÄÁÄÄÄÄÄÁÄÄÄÄÄÙ ÚÄÄÄÄÂÄÄÄÄÄÄÂÄÄÄÄÒÄÄÄÄÂÄÄÄÄÄÂÄÄÄÄÄÂÄÄÄÄÄÂÄÄÄÄÄÂÄÄÄÄÄÂÄÄÄÄÄ¿ ³t_id³ p_id ³weekºpt1 ³ pt2 ³ pt3 ³ pt4 ³ pt5 ³ pt6 ³ pt7 ³ ÃÄÄÄÄÅÄÄÄÄÄÄÅÄÄÄÄ×ÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄ´ ³ 1 ³ 273 ³ 1 º 10 ³ 2 ³ 6 ³ 8 ³ 3 ³ 3 ³ 0 ³ ³ 1 ³ 651 ³ 1 º 6 ³ 2 ³ 0 ³ 0 ³ 5 ³ 4 ³ 2 ³ ³ 2 ³ 35 ³ 1 º 26 ³ -10 ³ -6 ³ 8 ³ 0 ³ 7 ³ 3 ³ ³ 1 ³ 273 ³ 2 º 3 ³ 2 ³ 0 ³ 0 ³ 4 ³ 2 ³ 1 ³ ³ 1 ³ 651 ³ 2 º 8 ³ 0 ³ 3 ³ 4 ³ 3 ³ 3 ³ 1 ³ ³ 2 ³ 35 ³ 2 º 0 ³ 0 ³ 0 ³ 0 ³ 0 ³ 0 ³ 0 ³ ³ 1 ³ 273 ³ 3 º 6 ³ 0 ³ 0 ³ 8 ³ 3 ³ 3 ³ 1 ³ ³ 1 ³ 651 ³ 3 º 5 ³ 6 ³ 3 ³ 0 ³ 2 ³ 1 ³ 0 ³ ³ 2 ³ 35 ³ 3 º 0 ³ -10 ³ -5 ³ 4 ³ 0 ³ 4 ³ -6 ³ ÀÄÄÄÄÁÄÄÄÄÄÄÁÄÄÄÄÐÄÄÄÄÁÄÄÄÄÄÁÄÄÄÄÄÁÄÄÄÄÄÁÄÄÄÄÄÁÄÄÄÄÄÁÄÄÄÄÄÙ PRO_TEAM_LIST ÚÄÄÄÄÄÄÄÄÄÒÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ pt_id º pro_team_name ³ ÃÄÄÄÄÄÄÄÄÄ×ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ³ 0 º Boston Red Sox ³ ³ 1 º New York Yankees ³ ³ 2 º Detroit Tigers ³ ³ 3 º Cleveland Indians ³ ³ 4 º Milwaukee Brewers ³ ³ 5 º Baltimore Orioles ³ ³ 6 º Toronto Blue Jays ³ ³ 7 º Seattle Mariners ³ ³ 8 º Chicago White Sox ³ ³ 9 º Kansas City Royals ³ ³ 10 º California Angels ³ ³ 11 º Texas Rangers ³ ³ 12 º Oakland Athletics ³ ³ 13 º Minnesota Twins ³ ³ 14 º New York Mets ³ ³ 15 º Philadelphia Phillies ³ ³ 16 º St. Louis Cardinals ³ ³ 17 º Chicago Cubs ³ ³ 18 º Pittsburgh Pirates ³ ³ 19 º Montreal Expos ³ ³ 20 º Los Angeles Dodgers ³ ³ 21 º Houston Astros ³ ³ 22 º Cincinnatti Reds ³ ³ 23 º San Diego Padres ³ ³ 24 º San Francisco Giants ³ ³ 25 º Atlanta Braves ³ ÀÄÄÄÄÄÄÄÄÄÐÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ TEAM_FILE ÚÄÄÄÄÄÄÄÒÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ t_id º team_name ³ owner ³ league_name ³ ÃÄÄÄÄÄÄÄ×ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ³ 0 º Grizzlies ³ Deb Bear ³ Engineers ³ ³ 1 º Bat Busters ³ Chris Halasz ³ Crashers ³ ³ 2 º Super Cynics ³ Lance Lovick ³ Engineers ³ ³ 3 º No Sox ³ Pamela Perrott ³ Engineers ³ ³ 4 º Big Boppers ³ Scott Love ³ Crashers ³ ÀÄÄÄÄÄÄÄÐÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ TEAM_PLAYER_FILE ÚÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄ· ³ t_id ³ p_id º ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄĶ ³ 1 ³ 50 º ³ 1 ³ 265 º ³ 1 ³ 37 º ³ 1 ³ 28 º ³ 1 ³ 255 º ³ 1 ³ 76 º ³ 2 ³ 81 º ³ 2 ³ 3 º ³ 2 ³ 98 º ÀÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄĽ 3.5 Database Size Comparisons L---+---T1----+-T--2----T----3--T-+----4T---+---T5----+-T--6----T----7--T-+--R When initial system design was completed, the database sizes were as shown in "before" below. The files were larger than we wanted, so we came up with changes to decrease storage space. It was decided that 15 bytes was adequate to store both team and league names, and that a number of other fields could be reduced as well. Additionally, we included a player list, team list and pro_team list each with single bit ID's that would be stored in other files. Net_totals were dropped from league_weekly_points since they can be calculated. After all changes were made, the sizes were as shown in the "after" column. L---+---T1----+-T--2----T----3--T-+----4T---+---T5----+-T--6- R .s:8 .x:17 ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍÍÍÍÍ» º ³ RECORD ³ RECORD ³ NUMBER ³ TOTAL ³ TOTAL º º ³ SIZE ³ SIZE ³ OF ³ BYTES ³ BYTES º º ³ BEFORE ³ AFTER ³ RECORDS ³ BEFORE ³ AFTER º ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍ͹ º ALL_PLAYERS_YTD_STATS = { player_name + ³ 25 ³ ³ ³ ³ º º p_id + ³ ³ 2 ³ ³ ³ º º * 2 files like this * position + ³ 1 ³ 1 ³ 625 ³ ³ º º * are kept, one for * pro_team_name + ³ 25 ³ ³ (times ³ ³ º º * this week and one * pt_id + ³ ³ 1 ³ 2 ³ ³ º º * for last week * stats } ³ 2*7 ³ 2*7 ³ files) ³ ³ º º ³ ³ ³ ³ ³ º º TOTAL ³ 65 ³ 18 ³ ³ 81,250 ³ 22,500 º ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍ͹ º TEAM_FILE = { team_name + ³ 25 ³ 15 ³ ³ ³ º º t_id + ³ ³ 1 ³ 20 ³ ³ º º * t_id is * owner + ³ 25 ³ 25 ³ times ³ ³ º º * unique * league_name } ³ 25 ³ 15 ³ number of ³ ³ º º ³ ³ ³ leagues ³ ³ º º TOTAL ³ 75 ³ 56 ³ ³ 15,000 ³ 11,200 º ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍ͹ º ³ ³ ³ ³ ³ º º TEAM_PLAYER_FILE = { team_name + ³ 25 ³ ³ 460 ³ ³ º º t_id + ³ ³ 1 ³ times ³ ³ º º player_name + ³ 25 ³ ³ number of ³ ³ º º p_id } ³ ³ 2 ³ leagues ³ ³ º º ³ ³ ³ ³ ³ º º TOTAL ³ 50 ³ 3 ³ ³ 230,000 ³ 13,800 º ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍ͹ º ³ ³ ³ ³ ³ º º LEAGUE_FILE = { league_name + ³ 25 ³ 15 ³ 1 ³ ³ º º league_values } ³ 24*2 ³24*1 ³ per ³ ³ º º ³ ³ ³ league ³ ³ º º TOTAL ³ 73 ³ 39 ³ ³ 730 ³ 390 º ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍ͹ º ³ ³ ³ ³ ³ º º LEAGUE_WEEKLY_POINTS = { team_name + ³ 25 ³ ³ ³ ³ º º t_id + ³ ³ 1 ³ ³ ³ º º player_name + ³ 25 ³ ³ 26 ³ ³ º º p_id + ³ ³ 2 ³ weeks ³ ³ º º week + ³ 2 ³ 1 ³ times ³ ³ º º point_totals + ³ 7*2 ³ 7*1 ³ 460 ³ ³ º º net_totals } ³ 3 ³ ³ players ³ ³ º º ³ ³ ³ ³ ³ º º TOTAL ³ 69 ³ 11 ³ ³ 8,250,000 ³ 1,315,600 º ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÏÍÍÍÍÍÍÍÍÍÍÏÍÍÍÍÍÍÍÍÏÍÍÍÍÍÍÍÍÍÍÍÏÍÍÍÍÍÍÍÍÍÍÍÍÏÍÍÍÍÍÍÍÍÍÍͼ ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍÍÍÍÍ» º ³ RECORD ³ RECORD ³ NUMBER ³ TOTAL ³ TOTAL º º ³ SIZE ³ SIZE ³ OF ³ BYTES ³ BYTES º º ³ BEFORE ³ AFTER ³ RECORDS ³ BEFORE ³ AFTER º ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍ͹ º ³ ³ ³ ³ ³ º º PLAYER_LIST = { p_id + ³ ³ 2 ³ ³ ³ º º player_name + ³ ³ 25 ³ 625 ³ ³ º º position } ³ ³ 1 ³ ³ ³ º º ³ ³ ³ ³ ³ º º TOTAL ³ ³ 28 ³ ³ ³ 17,500 º ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍ͹ º ³ ³ ³ ³ ³ º º PRO_TEAM_LIST = {pt_id + ³ ³ 1 ³ ³ ³ º º pro_team_name } ³ ³ 25 ³ 26 ³ ³ º º ³ ³ ³ ³ ³ º º TOTAL ³ ³ 26 ³ ³ ³ 676 º ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍ͹ º ³ ³ ³ ³ ³ º º *** GRAND TOTAL *** ³ ³ ³ ³ ³ º º ³ ³ ³ ³ 8,576,980 ³ 1,381,666 º ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÏÍÍÍÍÍÍÍÍÍÍÏÍÍÍÍÍÍÍÍÏÍÍÍÍÍÍÍÍÍÍÍÏÍÍÍÍÍÍÍÍÍÍÍÍÏÍÍÍÍÍÍÍÍÍÍͼ .s:6 L---+---T1----+-T--2----T----3--T-+----4T---+---T5----+-T--6-R .x:10 It seemed clear at this point that the league_weekly_points file would have to be on disk. So would the all_players_YTD_stats file. These are accessed mainly at report time and can be read and reported on at the time statistics are downloaded or when reports are generated. We then decided to use a linked list to link the league to its teams, and the teams in a league to its players. Since several of the files above are merely for linking these together, we thought this scheme might be useful. We would keep the player_list file. This is a list of all pro players, whether they are on a team in a league or not. This would be implemented as an array of 1000 cells. There are about 625 professional players (26 teams of 24 players), but with some leaving the pros and others replacing them during the season, we wanted to allow for more total players in a year. Initially, we would sort the players alphabetically as we did the first statistics download and assign them p-id's. As others needed to be added, they would be added at the end.