mercredi 9 mars 2016

How to design relational database for public transport system

I'm working on a database that allows users to search buses they need to take to go from point A to point F. I'm not sure how to design the database schema so that single query (or maybe multiple) would return all the bus numbers they need to take and corresponding stops. It's sort of like google map bus feature where you provide starting and ending point and it gives you the bus numbers and corresponding stops. Right now, I'm thinking just simple Bus, Stop tables with stops categorized by the zones of the city (Centre town, East, West,..) and use A* search to identify the bus heading towards the zone that destination belongs to.

Aucun commentaire:

Enregistrer un commentaire