To make this easier I imported in Access. If all the needed data is there, but the tables are not properly normalized that would be fixable. You may have to create new tables and do sql inserts to populate with the old data. However, I looked at this and I am thinking somehow the necessary fields are lost.
Examples
1. You have two tables Dam and Sire which I would assume these are the parents of a given horse. In neither of these tables are a key to the child. This type of "parental" data is normally done in a self referencing table and that can be a little tricky. I cannot figure out what those tables show
Dam has three fields Breed, DamName, DamSire. I do not understand what this shows. Is DamSire the Sire of the Dam or is their a missing field.
Normally I would have a tbl like Horses
HorseID
HorseName
SireID
DamID
That DamID and SireID relate to a Horse ID in the same table. That is in the case where it is likely you maintain parent information in your table. This may not be your case. You may have the detailed information on a horse but only the names of parents.
2. There is a table of workout data. I assume that is a horses workout data? There is no information about a horse so how do you interpret that information?
3. There is a trainer table with a trainer key. I did not know if that key is a primary key, but I would expect in horseData to have some information on the trainer. I can not find the trainer key in the horsedata or even the trainer name. I can find the owner and breeder names.
The ppData needs to be normalized. Wherever you see the same groups of fields but numbered that is a hint that those columns need to be turned into rows in a child table.
So you see
ppdata
ppdata
position1 | lenback1 | horsetime1 | leadertime | pacefigure |
---|
2 | 50 | 24.07 | 23.99 | 65 |
Then this same data repeated
ppdata
ppdata
position2 | lenback2 | horsetime2 | leadertim2 | pacefigur2 |
---|
3 | 200 | 48.55 | 48.22 | 56 |
This data goes into a child table and these become rows. However, I do not really understand what this represents. Position 1 has a value of 2 which is not a horse ID. I would think this data is showing information about each horse in each position?
What is your goal? Are you trying to use the above data in a database or build a database that captures similar types of information. Either way I think you are better off building a clean set of tables from scratch. I would not try to save and chop this. Even if this is the source where you get information. You can periodically download this XML and create a set of insert queries to update you database with the current information. This would likely be the same set of queries you use the first time to move this information into a properly normalized database.