- Documentation
- /
- Road Maintenance
- /
- System Diagram
System Diagram
The Road Maintenance data model, mapped — 25 models, 50 relationships
🔍 For serious exploration, open the Interactive Diagram Viewer — it adds pan, mouse-wheel zoom, fit-to-screen, full-screen mode, a full ERD, and a focus mode that draws just one model and its neighbours at a chosen depth. The diagrams below are the readable, static summary.
Architecture Overview
The model has three layers: the network register (where work happens), the reference library (the rules of the guideline), and operational records (the work itself). The overview shows the principal links only — every arrow means "one row of the left model is referenced by many rows of the right model".
flowchart LR
subgraph NET["🗺️ Network register"]
District --> Network --> Road --> RoadSection --> RoadLocation
end
subgraph REF["📚 Reference library"]
MaintenanceElement --> DefectType --> DefectSubType
DefectSubType --> InterventionRule
MaintenanceElement --> MaintenanceActivity --> ActivityStandard
DefectSubType --> ValidDefectActivity
MaintenanceActivity --> ValidDefectActivity
end
subgraph OPS["🔧 Operational records"]
Inspection --> DefectObservation --> DefectAssessment --> DefectLogEntry --> DefectBacklog
DefectObservation --> PlannedWork --> WorkOrder --> WorkExecution
WorkOrder --> CompletionInspection --> DefectClosure
end
RoadSection --> Inspection
InterventionRule --> DefectAssessment
MaintenanceActivity --> WorkOrder
Module 1: Network Register
Where work happens — the road hierarchy from district down to a pinpoint
location. RoadCategory (from the reference library) classifies roads and
sections.
erDiagram
District ||--o{ Network : "district_id"
District ||--o{ Road : "district_id"
Network ||--o{ Road : "network_id"
Road ||--o{ RoadSection : "road_id"
RoadSection ||--o{ RoadLocation : "road_section_id"
RoadCategory ||--o{ Road : "road_category_id"
RoadCategory ||--o{ RoadSection : "road_category_id"
Module 2: Reference Library
The rules of the guideline — defect taxonomy, intervention rules, activities and standards. A new guideline edition is a data load into these tables, not a software release.
erDiagram
MaintenanceElement ||--o{ DefectType : "maintenance_element_id"
DefectType ||--o{ DefectSubType : "defect_type_id"
MaintenanceElement ||--o{ MaintenanceActivity : "maintenance_element_id"
MaintenanceActivity ||--o{ ActivityStandard : "maintenance_activity_id"
DefectSubType ||--o{ InterventionRule : "defect_sub_type_id"
RoadCategory ||--o{ InterventionRule : "road_category_id"
CorporatePriority ||--o{ InterventionRule : "corporate_priority_id"
DefectSubType ||--o{ ValidDefectActivity : "defect_sub_type_id"
MaintenanceActivity ||--o{ ValidDefectActivity : "maintenance_activity_id"
RoadCategory ||--o{ ValidDefectActivity : "road_category_id"
UnitOfMeasurement ||--o{ DefectSubType : "unit_of_measurement_id"
UnitOfMeasurement ||--o{ InterventionRule : "unit_of_measurement_id"
UnitOfMeasurement ||--o{ MaintenanceActivity : "unit_of_measurement_id"
Module 3: Operational Records (Defect Lifecycle)
The work itself: inspect → observe → assess → log → plan → order → execute → verify → close, with the governed backlog as the funding-constrained side exit.
erDiagram
Inspection ||--o{ DefectObservation : "inspection_id"
DefectObservation ||--o{ DefectAssessment : "defect_observation_id"
DefectAssessment ||--o{ DefectLogEntry : "defect_assessment_id"
DefectObservation ||--o{ DefectLogEntry : "defect_observation_id"
DefectLogEntry ||--o{ DefectBacklog : "originating_log_entry_id"
DefectObservation ||--o{ DefectBacklog : "defect_observation_id"
DefectObservation ||--o{ PlannedWork : "defect_observation_id"
PlannedWork ||--o{ WorkOrder : "planned_work_id"
WorkOrder ||--o{ WorkExecution : "work_order_id"
WorkOrder ||--o{ CompletionInspection : "work_order_id"
CompletionInspection ||--o{ DefectClosure : "completion_inspection_id"
WorkOrder ||--o{ DefectClosure : "work_order_id"
DefectObservation ||--o{ DefectClosure : "defect_observation_id"
Cross-module references not drawn above (see the Full ERD in the
interactive viewer): operational records also reference the network register
(RoadSection and RoadLocation on observations, inspections, planned work
and work orders) and the reference library (DefectSubType on observations;
InterventionRule and CorporatePriority on assessments;
MaintenanceActivity and ActivityStandard on planned work and work orders;
UnitOfMeasurement on observations, planned work and executions).
Reading the Diagrams
A ||--o{ Bmeans one row of A is referenced by many rows of B (the label is the foreign-key column on B).- Arrows in the overview point the same way: parent → children.
- The three-layer split matches the sidebar menu grouping in the app.
Diagrams are derived from the generated schema metadata
(apps/road_maintenance/generated/json/road_maintenance_relationship_metadata.json).
If the DSL schema changes, regenerate that metadata and update this page and
the viewer's embedded data.