MIS 4372 -- Midterm -- Spring 2013 -- Parks

Execute Answer page here (Source code for answers here)

Assume, there is a little league baseball league that keeps player statistics. There is a table named LLteam that holds the team data; a table named players that holds individual player demographic information; and a table named game_perf that records the events associated with a player's game performance. The data structures for these tables are shown below:
LL_team player game_perf
team_id int IDENTITY (1,1),
team_name varchar(30),
coach_first_name varchar(25),
coach_last_name varchar(25),
coach_home_phone varchar(10),
coach_cell1 varchar(10),
coach_cell2 varchar(10),
PRIMARY KEY (team_id)
player_id int IDENTITY (1,1),
first_name varchar(25),
last_name varchar(25),
home_phone varchar(10),
cell1 varchar(10),
cell2 varchar(10),
team_id int,
age int,
PRIMARY KEY (player_id)
game_data_id int IDENTITY (1,1),
player_id int NOT NULL,
opponent_id int,
game_date char(6),
innings_played int,
at_bats int,
hits int,
walks int,
fielding_errors int,
innings_pitched numeric (4,1),
hits_allowed int
walks_allowed int,
winning_or_losing_pitcher char(1),
PRIMARY KEY (game_data_id)

1. (40 points) Write the first three passes for a MODIFY program (named "fix.asp") that allows the league officials to modify a player's game performance statistics (i.e., the contents of game_perf). Specifically:

  1. the first pass provides a set of links to pass 2 that list ALL the teams by team_name in ASC order EACH with a link like this on a single line:

    <a href='fix.asp?token=2&tid=[value of the team_id]'>[value of the team_name]</a>

  2. the second pass provides a set of links to pass 3 that list ALL the players on the team chosen in the previous pass in "...last_name ASC, first_name ASC order" EACH with a link like this on a single line:

    <a href='fix.asp?token=3&pid=[value of the player_id]'>[last_name of the player], [first_name of the player]</a>:

  3. the third pass provides a set of links to specify the game_perf table rows for the player chosen in pass 2 above. This pass lists all the games for the player (no order by clause):

    <a href='fix.asp?token=4&gid=[value of game_data_id]'>[game_date]</a>:

2. (60 points) Write the two subs for passes 4 and 5 of fix.asp that allows: