Menu

1 / 2

Normalizing 77 years of MotoGP results into SQLite

DEV Community: php·Manuel Escrig·5 days ago
#y7iS2IQE
#devto#dev#live#race#results
Reading 0:00
15s threshold

Race Results is my MotoGP, Moto2 and Moto3 companion app for iOS. It has a live countdown, session times in your own time zone, standings, widgets and Live Activities. But the part I enjoyed building the most is the History tab: every season since 1949 🏍️

Don't trust the upstream API to stay around

The app reads from a public MotoGP results feed, but it doesn't depend on it for history. A small PHP backend normalizes the feed into SQLite , so finished seasons stay fast and keep working even if the provider changes something.

Lazy fill: when someone opens an old season, Grand Prix or session, the backend fetches it and stores it right then.

Full backfill: a resumable importer can load the whole premier-class archive, from 1949 until today, in one run.

Championships get renamed

The hardest part of the data model is that the classes changed names over the years. 500cc became MotoGP, 250cc became Moto2 and 125cc became Moto3.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.