Answer the question
In order to leave comments, you need to log in
How to link an entire database table to a specific row in another table?
I'm creating a database of public urban transport and ran into several problems.
Since I'm a beginner, I don't know much about MS Access.
The idea is this: I have a route table. It includes the following data: route ID, bus number, route name, fare, distance of the direct / return route, number of stops of the direct / return route, minimum-maximum bus interval (possibly replaced by a schedule), travel time, start / end route work and route working days.
There is also a list of all stops where these buses stop
AND for one route (1 Bus) there is a list of stops in one direction (and the distance from the previous one to this stop). Naturally, such tables should be for each bus.
The question is the following. How to correctly link the entire table of route stops (and there will be 2 of them - direct and reverse) with lines in the list of routes (first table)?
Or can it be done in a different and better way? And is it possible to assign the value of a one-dimensional array to a cell in a database table?
Answer the question
In order to leave comments, you need to log in
Good. We make an intermediate table. Three fields.
Rid - Random ID for this table,
id_bus - here we write the number of the route
and id_busstop - here we write the stop.
Everything. As many stops per route, as many routes as you want. Well, you can still add a sign, is_direct, bit. If 1 - then direct route, if 0 - reverse.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question