I have never really had the need to use a database until recently when I undertook a project to develop my understanding of a particular area of statistics – multinomial logit modelling. So now I have a need to understand databases and have no idea where to begin, and some Googling brought me here.
I am acquiring race data (using PERL) from various websites. That data includes (but is not exhaustive) various elements of the race such as date, time, venue, track condition. Data about starting position, finishing position, times and opening odds, pool sizes, finishing odds, etc for each competitor in a race.
The goal is to then supply the details of some future race, evaluate the competitors and the venue and make a prediction as to the outcome of that race.
How should data of this nature be stored with in such a database? Would it be one massive table in which all data is stored on mass or should it be broken up so that there is one table for every competitor which then lists all other details under it?
I am really very green and hope that someone could offer some advice as to how such a database should be established.
For the sake of completeness I plan to use MySQL but I wouldn’t think this has any bearing on my query
Thank you for replying, the diagram has helped me understand a little more.
Though I am having trouble visualising how it works, it terms of adding data from any given race and in which table that data should sit. For example, if horse X finished 1st would that be entered in the race table, the horse table or both?
The right approach is to step back and think about the English that would describe the situation.
We can use this Data Model - Horse Racing Data Model
The English to describe he situation is :-
"A Horse participates in a race and ends up in a position - 1,2,3 and so on."
Then we would say that Horse details belong in the Horse table, Race details belong in the Races table and the participation details (including final position) belong in the Horse_Race_Participation table.