In the "Bus route query system background Database design-Query algorithm", the article has realized the query site to the site Route query algorithm, but, in reality, users do not necessarily use the site to query, but the use of place names. Therefore, the bus query system database must record the corresponding relationship between the place name and the site, map the place name to the site in the query. According to the actual situation, there are usually several sites near a certain location, so there is a many-to-many relationship between the place name and the site. Obviously, just create a name site relational table Stop_spot (Stop,spot) to store this relationship. The database diagram is as follows:
Note:
Route: Route List
Stop: Site Table
Spot: Table of Names
Stop_route: Route-Site Relations table
Stop_spot: Place name-Site relations table