Games league database

Soldato
Joined
27 Dec 2005
Posts
17,296
Location
Bristol
I'm making a website to digitise a local boules league. Has anyone made a league database before, and is there anything I'm missing?

Teams play in various leagues (not ranked, just groups) with the two top teams going into a knockout. The knockout needn't be digitised on the fly as it's all played on one day but it would be good to log the results and show the overall winner etc.

Any tips? Should I also have a LEAGUE table or is it ok to calculate positions every time based on the MATCHES database?

Code:
TEAMS
id
email
password
name
league

MATCHES
id
date
team1
team2
score1
score2
difference
winner

Any tips appreciated!
 
Soldato
OP
Joined
27 Dec 2005
Posts
17,296
Location
Bristol
I would personally calculate positions very time based upon the matches table just in case you ever entered a match incorrectly, it could prove awkward to then retrospectively fix up the LEAGUE table.

I also hope that password field is actually a hash of a salt and a password :)

I'm no pro so unsure what you mean by salt and password? I generally use MD5, certainly no plain text here.

You can just calculate the ranking based on the matches database each time the page is requested, I am sure it won't be intensive unless you have thousands of entries? :p

Yeah what I figured. And no, not thousands :p. It's an inter-business league with probably about 40 companies. Digitizing it for a bit of free advertising :).
 
Back
Top Bottom