|
|||||||
New to SitePoint Forums? Register here for free!
|
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
SitePoint Evangelist
![]() ![]() ![]() ![]() Join Date: Mar 2005
Location: Ottawa, Canada
Posts: 580
|
Table Normalization Help
Ok I'm trying to build an experimental hockey league system for fun. I'm trying to get the database design down and this is what I have so far :
------------- * Season Table season_id | season_name * Teams Table team_id | season_id | team_name | division_id * Divisions Table division_id | season_id | division_name | division_rank * Players Table player_id | season_id | team_id | player_surname | player_name | player_is_goalie * Game Table game_id | season_id | division_id | team_id1 | team_id2 | goalie_player_id1 | goalie_player_id2 | game_date | rink_id * Rink Table rink_id | season_id | rink_name | rink_map * Stats Table stats_id | season_id | game_id | team_id | goal_player_id | ***_player_id1 | ***_player_id2 | goal_time | goal_attrib * Penality Table penality_id | season_id | game_id | player_id | pen_time * Suspension Table suspension_id | season_id | player_id | suspension_end_date ------------- If the tables are not properly normalized, I'd like advice to improve the overall to reduce complexity on the queries. Now, I'm no SQL expert. I'd like to get list the scorers/assists for each team with their names from the player table for a particular game. Also, I'd like to get a team overall stats for example. How many goals they scored and how many they got scored for the entire season using the games table and stats table with their team_id. Thanks |
|
|
|
| Bookmarks |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
|
All times are GMT -7. The time now is 01:43.









Threaded Mode