Hi,
I am posting here to ask for some advice, primarily with database design. Firstly, I will give a brief outline of the project I am working on.
I have to create a database of sports results for races which will be used on a web site and will be available to site visitors. For the time being, this will contain horse racing results. There are a number of fields that i have to include in the database. I wont go into every detail, just give the general idea.
Basically, the data base will contain information on a horse race, and also on the horses running the race. I think it would be best to put these in 2 different tables.
Firsly, the Race table will have the race name, start time, location and number. Secondly, the Horses table will contain Horse name, number, status and result.
Now, heres how a user is going to access the data. Firstly, they will go to a page that has a date drop down box, once they submit this the app will query the database and display the location of all the races that took place on that date. The user will then click on the location link which will query the database and display all the races for that location on that day. Each of these will when clicked display a results page which will list the first 6 places (1st - 6th), the horse name, its number and its starting price. The status field will be used to say what position the horse came and also if it was a non runner etc.
I am not too hot at DB design so I am looking for some advice on the best way to associated the data in the Horses table with the corresponding race data. I think you have to use foreign keys etc but I am not too sure.
I have a looming deadline for this so please - any help at all is much appreciated!
Thanks in advance,
Martin