Link to home
Start Free TrialLog in
Avatar of shaneholmes
shaneholmes

asked on

Table Normalization Part 2

OK, to add onto previous question:

https://www.experts-exchange.com/questions/20968246/Normalizing-Tables.html

i think this design will work, but it will take some re-working of my existing application, any suggesions:

I will then post a question for SQL statements need to calculate points.

Thanx!

Shane



Teams
- id
- Name

Players
- id
- TeamId
- Name  
- Points - Calculated

Matches
- id
- Date
- Team1
- Team2

MatchResults
- id
- MatchId
- Team
- Points - Calculated Field

Games
 - Id
 - MatchId
 - MatchType - {Singles, Doubles}

GameResults
 - Id
 - GamesId
 - Player - Selected from Players
 - Points (not calculated)
Avatar of esoftbg
esoftbg
Flag of Bulgaria image

May be:

Teams
- id
- Name
- Points - Calculated

Players
- id
- TeamId
- Name  
- Points - Calculated

Matches
- id
- Date
- Team1
- Team1Points - Calculated Field
- Team2
- Team2Points - Calculated Field

Games
 - Id
 - MatchId
 - MatchType - {Singles, Doubles}

GameResults
 - Id
 - GamesId
 - Player - Selected from Players
 - Points (not calculated)
Avatar of shaneholmes
shaneholmes

ASKER

Yeah, i had that before in my original design - see link above
i dont belive its normalized that way - I ran into problems earlier trying to use it like that um then again, i dont know what my new sqls will be like

Shane
I think the fields Team1 and Team2 in the table Matches double the field Team in the table MatchResults:

Teams
- id
- Name
- Points - Calculated

Players
- id
- TeamId
- Name  
- Points - Calculated

Matches
- id
- Date

MatchResults
- id
- MatchId
- TeamId
- Points - Calculated Field

Games
 - Id
 - MatchId
 - MatchType - {Singles, Doubles}

GameResults
 - Id
 - GamesId
 - Player - Selected from Players
 - Points (not calculated)
May be:

Matches
- id
- Date
- MatchType - {Singles, Doubles}

//.......................

Games
 - Id
 - MatchId
Here is 01:16 AM, I will go into the bed. Tomorrow will be a better day for programming :-))
Not tomorrow - today but after the dream....
I have not Access, so i developed a simple hint-example:
http://www.geocities.com/esoftbg/Q_20971121.zip
esoftbg, im getting this message....

We're sorry, but this page is currently unavailable for viewing.
If this site belongs to you, please read this help page for more information and assistance.

Shane
ASKER CERTIFIED SOLUTION
Avatar of esoftbg
esoftbg
Flag of Bulgaria image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial