Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2012
    Posts
    1

    Motorsport Results

    Hi everyone, I'm planning a database of 25 years' worth of racing results and would like some help with the layout and concept before I make a start on it.

    In short, it needs to list the results of every practice session, qualifying session and race at each event this racing series held since it began. I'd also like to be able to list the riders who competed at each one, details of the circuits raced at and a few other things, as well as being able to search the results and compile statistics for each rider and circuit. It's pretty comprehensive in theory but I could use some help getting started.

    These are the tables I have planned out:

    Results
    ResultID (autonumber, primary key)
    SessionType (foreign key)
    EventID (foreign key)
    FinishPosition
    EntryID (foreign key)
    FinishTime
    LapsCompleted
    RetiredFor
    FastestTime
    FastestLap
    LapsLed

    Session
    SessionType (string, primary key)
    SessionName
    SessionDay

    Event
    EventID (autonumber, primary key)
    Year
    RoundID
    EventDate
    EventPermit
    CircuitID (foreign key)
    CircuitVariant
    CircuitLength

    Entry
    EntryID (autonumber, primary key)
    EventID (foreign key)
    EntryNumber
    RiderID (foreign key)
    Class (foreign key)
    WildCard
    Replacement
    ReplaceNo
    TeamName
    BikeID (foreign key)
    TyreID (foreign key)
    Withdrew
    Notes

    Circuit
    CircuitID (string, primary key)
    CircuitName
    CircuitLocation
    CircuitCountry
    CircuitOpened
    CircuitDirection
    CircuitPolePosition

    Rider
    RiderID (autonumber, primary key)
    FirstName
    Surname
    Nationality
    DateOfBirth
    Birthplace
    DebutRace

    Class
    ClassID (string, primary key)
    ClassName

    Bike
    BikeID (autonumber, primary key)
    ManufacturerID (foreign key)
    BikeModel

    Manufacturer
    ManufacturerID (autonumber, primary key)
    ManufacturerName
    ManufacturerCountry

    At the moment I'm a bit stuck on how to assign points scored. Rather than creating a new field in the results, is it possibly to automatically assign points to the top 15 riders in each race? I'd also like to be able to add up total points scored by each rider in a year and compile championship totals for each season.

    Any help and feedback would be greatly appreciated.

  2. #2
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    What's stored in the Session table? It looks like a simple reference table, but then it has date values in it too.

    What are the natural keys for each table? Its ok to use surrogates (I put them on all my tables), but you also need to define a natural key within the data (one or more columns) and define that as unique.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  3. #3
    Join Date
    Sep 2009
    Location
    Ontario
    Posts
    1,057
    Did you leave out "Qualifying Time" and "Grid Position"

Posting Permissions

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