|
Yes
I do it for my Dream team fantasy golf section. However there is no magic involved just simple planning.
1 table for the team.
1 table for the events,
1 table for the scores.
Teams (id, Name, total_points)
Event (id, Name)
Score (id, teamId, EventId, position, score);
Then you select sum(points) from Score where eventId=1 and playerId=1 (as an easy method) but you can insert from select on total_points to cut the code down..
Of course when you have a few thousand teams you will notice a massive hit on the server when you sum it up. But once you sum once for the tourny then you can miss suming it untill the next one.
As your total points are stored with your team details you just select * from teams order by total points.
The moral of the story been "let the DB do the work".
Ibbo
|