parking pricing table structure#
The parking pricing table lists the price for each time range for a specific parking rule at a given parking
Field |
Type |
NULL allowed |
Default Value |
Foreign key |
Description |
---|---|---|---|---|---|
parking |
INTEGER |
NO |
Parking(parking) |
The parking facility identifier (Foreign key reference to the parking table) |
|
parking_rule |
INTEGER |
NO |
Parking_Rule(parking_rule) |
Parking rule type (Foreign key reference to the parking_rule table) |
|
entry_start |
INTEGER |
NO |
Start of the entry time range when the price is applicable for this parking rule (seconds) |
||
entry_end |
INTEGER |
NO |
End of the entry time range when the price is applicable for this parking rule (seconds) |
||
price |
REAL |
NO |
Parking price for the current parking rule and time range ($) |
(* - Primary key)
The SQL statement for table and index creation is below.
create TABLE IF NOT EXISTS Parking_Pricing (
parking INTEGER NOT NULL,
parking_rule INTEGER NOT NULL,
entry_start INTEGER NOT NULL,
entry_end INTEGER NOT NULL,
price REAL NOT NULL,
CONSTRAINT "parking_fk" FOREIGN KEY("parking") REFERENCES "Parking"("parking") DEFERRABLE INITIALLY DEFERRED
CONSTRAINT "parking_rule_fk" FOREIGN KEY("parking_rule") REFERENCES "Parking_Rule"("parking_rule") DEFERRABLE INITIALLY DEFERRED
);