, Today's Free News And Tips...

13th February 2017

Hi ,

Carrying on from where we left off last week puts us at the stage of designing our database table layouts. A database is made of different tables, and each table contains data.

For example, a trainer table may just container the trainers name and an ID to allow us to find them quickly and easily. One important rule of a database is that...

...every table should have an ID number.

This makes finding the information later on much simpler.

Of course, not all the tables are going to be as simple as the trainer example, but how you lay them out at the beginning is going to determine the complexity of your database and what you can do with it.

It's a running theme of racing databases that the more planning you do at the beginning, the more effective your database will be to you later on.

This brings us back to the earlier stages in creating a database where you decided exactly what it is that you want to do with it. Personally, I work on the assumption that the database needs to be as flexible as possible because I will think of things I want to use it for in the future that I haven't planned.

While this means that initially it takes longer to setup and build it, it saves the need to re-develop your database in a few years because it can't do what you want it to!

So, what are some of the tables that we may need in our database?

Below is a list of the essential tables in your database:

  • Trainers
  • Jockeys
  • Horses
  • Courses
  • Race Conditions
  • Horses Races

When I said ‘essential’ these are the tables that I would personally choose to have as an absolute minimum. Of course, it's possible to use less tables if you want to. I know someone who has just two tables in their racing database.

Of the tables I recommend above, the first two simply have the trainer and jockey names along with an ID number for each of them.

The horses table contains the horses name and any other information specific to the horse. Examples of this information is foaling date, dam, sire etc…… and of course, as always, an ID number.

Race Conditions is the table where you store all the information about a race. This includes the race name, going, distance, number of runners, prize money etc… and...

...an ID number!

Horses Races is for all the information specific to each horse in each race. This is where you would put official ratings, speed figures, finish positions etc… and the ID number.

The Race Conditions and Horses Races table are the main tables and they would link to, via the ID's, the jockey, trainers, horses and courses tables.

Best Wishes,

Michael Wilding