Link to home
Start Free TrialLog in
Avatar of Chris Millard
Chris MillardFlag for United Kingdom of Great Britain and Northern Ireland

asked on

MySQL for race results

I want to create a MySQL database to hold the results of a race that will take place annually.

The details I want in the table are:-
surname, firstname, racenumber, finishtime, year

Each year, runners will be issued a unique race (bib) number. However, the same set of numbers will be used each year.

What is the best way of keeping the racenumber field unique for each year? (i.e. racenumber must be a unique number between 1 and 200 for year 2015, and then again must be a unique number between 1 and 200 for year 2016 etc)
SOLUTION
Avatar of arnold
arnold
Flag of United States of America 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
ASKER CERTIFIED SOLUTION
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
Avatar of Chris Millard

ASKER

Thanks for the ideas - I haven't made a decision yet, as I have just over a year in order to finalise everything.