I'm working with a database that holds race schedule info, including results.
Each race has many drivers, and each driver can be in many races. Pretty straight forward.
So we have a races table, a drivers table, and a drivers_races join table.
For each race & driver pair, there exists unique data, such as starting position, end position, etc.
It makes sense to me to put those into the join table like so:
drivers_races
driver_id int
race_id int
start int
result int
etc.
Any advice on working with this table? I could create a model for it maybe, but I am not familiar enough with RoR yet to really know how to access it efficiently. I'd like to avoid using raw SQL if possible.







Bookmarks