Results 1 to 4 of 4

Thread: Database design

  1. #1
    Join Date
    Jun 2013
    Posts
    3

    Database design

    Hi Everyone

    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

    Cheers

    Shaun

  2. #2
    Join Date
    Jul 2012
    Posts
    40

    Data Models from Database Answers

    Hi

    There are a couple of Data Models for Horse Racing on my Database Answers Web Site that you will point you in the right direction :-
    Horse Racing Data Model

    Horse Racing and Betfair Data Model

    HTH

    Barry in London

  3. #3
    Join Date
    Jun 2013
    Posts
    3
    Hi Barry

    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?

    Still a long way to go it seems .

    Cheers

    Shaun

  4. #4
    Join Date
    Jul 2012
    Posts
    40

    Step back and think about the problem

    Hi

    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.

    HTH

    Barry

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •