===============================
Appendix A – Data Model Diagram
===============================
.. graphviz::
digraph G {
fontname="ROBOTO" fontsize="10pt"
node [fontname="ROBOTO" fontsize="8pt"]
edge [fontname="ROBOTO" fontsize="8pt"]
rankdir=LR
graph [pad="0.5", ranksep="0.75", nodesep="0.65"];
subgraph cluster_property { label="Electoral Boundaries"
graph[style="dashed,rounded" color="#EA6B66"]
comm_electoral_polygon [shape=plain
label=<
COMM_ELECTORAL_POLYGON |
PK |
COMM_ELECTORAL_POLYGON_PID: varchar (15) |
|
DATE_CREATED: date |
|
DATE_RETIRED: date |
FK |
COMM_ELECTORAL_PID: varchar (15) |
|
GEOMETRY: Polygon |
>];
comm_electoral [shape=plain
label=<
COMM_ELECTORAL |
PK |
COMM_ELECTORAL_PID: varchar (15) |
|
DATE_CREATED: date |
|
DATE_RETIRED: date |
|
COMM_ELECTORAL_NAME: varchar (50) |
|
DATE_GAZETTED: date |
FK |
STATE_PID: varchar (15) |
|
REDISTYEAR: number (4) |
>];
state_electoral_polygon [shape=plain
label=<
STATE_ELECTORAL_POLYGON |
PK |
STATE_ELECTORAL_POLYGON_PID: varchar (15) |
|
DATE_CREATED: date |
|
DATE_RETIRED: date |
FK |
STATE_ELECTORAL_PID: varchar (15) |
|
GEOMETRY: Polygon |
>];
state_electoral [shape=plain
label=<
STATE_ELECTORAL |
PK |
STATE_ELECTORAL_PID: varchar (15) |
|
DATE_CREATED: date |
|
DATE_RETIRED: date |
|
STATE_ELECTORAL_NAME: varchar (50) |
|
DATE_GAZETTED: date |
|
EFFECTIVE_START_DATE: date |
|
EFFECTIVE_END_DATE: date |
FK |
STATE_PID: varchar (15) |
FK |
STATE_ELECTORAL_CLASS_CODE: varchar (10) |
>];
state_electoral_class_aut [shape=plain
label=<
STATE_ELECTORAL_CLASS_AUT |
PK |
CODE: varchar (10) |
|
NAME: varchar (50) |
FK |
DESCRIPTION: varchar (200) |
>];
comm_electoral_polygon -> comm_electoral [arrowhead=nonetee dir=both arrowtail=crownonetee]
state_electoral_polygon -> state_electoral [arrowhead=nonetee dir=both arrowtail=crownonetee]
state_electoral_class_aut -> state_electoral [arrowhead=crownonetee dir=both arrowtail=nonetee]
{rank = same;comm_electoral; state_electoral;state_electoral_class_aut}
}
subgraph cluster_state {
graph[style="dashed,rounded" color ="#7EA6E0" label="State Boundaries" ]
state [shape=plain
label=<
STATE |
PK |
STATE_PID: varchar (15) |
|
DATE_CREATED: date |
|
DATE_RETIRED: date |
|
STATE_NAME: varchar (50) |
|
STATE_ABBREVIATION: varchar (3) |
>];
}
comm_electoral -> state [arrowhead=nonetee dir=both arrowtail=crownone]
state_electoral -> state [arrowhead=nonetee dir=both arrowtail=crownone]
subgraph cluster_legend {
graph[style="" label="Legend", ranksep="0.2", nodesep="0.2"];
legend [shape=plain
label=<
|
Spatial Attribute Table |
|
Textual Attribute Table |
|
Authority Code Table |
>]
key [shape=plain label=<>]
key2 [shape=plain label=<>]
key:i1 -> key2:i1 [arrowhead=nonetee]
key:i2 -> key2:i2 [arrowhead=crown]
key:i3 -> key2:i3 [arrowhead=crownonetee]
legend -> key[style = invis]
}
}