algorithm - Database Design : Creating database and User Interface for recurring events -


we creating web-application of bus service people search , book seat. want give ui admin s/he can specify recurring trips.

for example volvo bus run city1 city2 every day 9:00 except tuesday. there can number of such criteria.

how should store such different recurring trips can searched without perfomance hit? how should representd in ui easy admin work with.

current database design:

table : trip_master trip_id name  table : timetable id trip_id city_id arrival_time departure_time seq_no 

your options a) store entities representing each occurrence of recurring trip (as might populate calendar table row representing each day of year), approach leverages sql or b) store rule representing recurring schedule, require more procedural code throughout application. favor option a), though requires routines populate trip-occurrences table on periodic basis.


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -