Skip to content
This repository has been archived by the owner on May 27, 2024. It is now read-only.

Database Overview

Nipuna Gunathilake edited this page Jul 12, 2015 · 1 revision

##Entity Relation Diagram

The following ER diagram is a tentative one. This is subject to change

ER-Diagram

##Storing the errors and warnings

The GTFSFeedItteration table would hold the iterations protocol buffer file in its feedProtobuf field. This can be used to recreate the entire feed at the given time.

Each iteration with errors or warnings has a MessageLog table. This table contains the iterationID, and an errorID. Looking at this table combined with the Errors table, we can determine the description for the given error. Also, if additional information such as a way to fix the error/warning needs to be added in the future, that details can be added to the Error table.

The MessageLog table only makes one entry per an error or warning in a given feed iteration.
ex- For the BART agenies TripUpdate feed(http://api.bart.gov/gtfsrt/tripupdate.aspx) feed at 1436684212 if there are vehicle_id not populated warning (w002) there would be only one entry in the MessageLog table.

For each occurrence of the error or warning, a new tuple in the Occurrences table will be created. This will contain the json path to the element that is causing the error, and the value it is holding.

The json path will be saved in the JSONPath format. This will allow for displaying the errors at the exact place in a feed.

Clone this wiki locally