I am designing a bus timetable using SQL. Each bus route has multiple stops, do I need a different t

Posted by Henry on Stack Overflow See other posts from Stack Overflow or by Henry
Published on 2010-03-23T21:27:02Z Indexed on 2010/03/23 21:43 UTC
Read the original article Hit count: 269

Filed under:
|
|
|

I am trying to come up with the most efficient database as possible. My bus routes all have about 10 stops. The bus starts at number one until it reaches the 10th stop, then it comes back again. This cycle happens 3 times a day.

I am really stuck as to how I can efficiently generate the times for the buses and where I should store the stops. If I put all the stops in one field and the times in another, the database won't be very dynamic.

If I store all the stops one by one in a column and then the times in another column, there will be a lot of repeating happening further down as one stop has multiple times.

Maybe I am missing something, I've only just started learning SQL and this is a task we have been set.

Thanks in advance.

© Stack Overflow or respective owner

Related posts about bus

Related posts about timetable