timing nested records table structure#
This table contains the individual records of timing for each signal phase, and connects to the timing ID through its object_id. In this sense, there is no unique identifier in this table, as a single record does not mean much.
Field |
Type |
NULL allowed |
Default Value |
Foreign key |
Description |
|---|---|---|---|---|---|
object_id |
INTEGER |
NO |
Timing(object_id) |
timing id that it refers to |
|
index |
INTEGER |
NO |
index within the timing id |
||
value_phase |
INTEGER |
NO |
0 |
referred phase |
|
value_barrier |
INTEGER |
NO |
0 |
not used currently in POLARIS |
|
value_ring |
INTEGER |
NO |
0 |
not used currently in POLARIS |
|
value_position |
INTEGER |
NO |
0 |
similar as index, currently not used |
|
value_minimum |
INTEGER |
NO |
0 |
minimum green time (for fixed time set min=max=green time) |
|
value_maximum |
INTEGER |
NO |
0 |
maximum green time (for fixed time set min=max=green time) |
|
value_extend |
INTEGER |
NO |
0 |
green extension for actuated phase |
|
value_yellow |
INTEGER |
NO |
0 |
yellow time |
|
value_red |
INTEGER |
NO |
0 |
all red time |
(* - Primary key)
The SQL statement for table and index creation is below.
create TABLE IF NOT EXISTS Timing_Nested_Records(
object_id INTEGER NOT NULL,
"index" INTEGER NOT NULL,
value_phase INTEGER NOT NULL DEFAULT 0,
value_barrier INTEGER NOT NULL DEFAULT 0,
value_ring INTEGER NOT NULL DEFAULT 0,
value_position INTEGER NOT NULL DEFAULT 0,
value_minimum INTEGER NOT NULL DEFAULT 0,
value_maximum INTEGER NOT NULL DEFAULT 0,
value_extend INTEGER NOT NULL DEFAULT 0,
value_yellow INTEGER NOT NULL DEFAULT 0,
value_red INTEGER NOT NULL DEFAULT 0,
CONSTRAINT "object_id_fk" FOREIGN KEY("object_id") REFERENCES "Timing"("timing_id") ON DELETE CASCADE
);
CREATE INDEX IF NOT EXISTS "idx_polaris_Timing_nested_records_index" ON "Timing_nested_records" ("index");
CREATE INDEX IF NOT EXISTS "idx_polaris_Timing_nested_records_object_id" ON "Timing_nested_records" ("object_id");