.. _fare_zones_transit_data_model:

**fare zones** table structure
==============================

The *fare_zones* table hold information on the transit fare zones and
the transit agencies that operate in it.

**transit_fare_zone** identifies the transit fare zones

**agency_id** identifies the agency/agencies for the specified fare zone

.. csv-table:: 
   :header: "Field", "Type", "NULL allowed", "Default Value"
   :widths:    30,     20,         20,          20

   transit_fare_zone,TEXT,NO,
   agency_id,INTEGER,NO,


(* - Primary key)



The SQL statement for table and index creation is below.


::

   
   CREATE TABLE IF NOT EXISTS fare_zones (
   	transit_fare_zone    TEXT    NOT NULL,
   	agency_id            INTEGER NOT NULL,
   	FOREIGN KEY(agency_id) REFERENCES agencies(agency_id) deferrable initially deferred
   );
