GTFS data into a Postgres Database

37 views Asked by At

I am developing an app where there user can upload a gtfs.zip containing all the files (agency.txt, trips.txt, etc). The database I created is relational so in the table routes there's a foreign key that points to the agency_id on that table and so on with the other possible relations. I've done this because the idea is to upload more than one GTFS to the app.

The question is, is this the correct way to create this kind of database? or should i create the database without relations? In fact this all comes because in the trips.txt theres a field named service_id that can be both, from calendar.txt or calendar_dates.txt and there's no way to make a double foreign key. Did anyone done this before?

Thanks in advance

0

There are 0 answers