- Documentation
- /
- Minex Drill
- /
- System Diagram
System Diagram
The Minex Drill data model, mapped — 80 models, 209 relationships
🔍 For serious exploration, open the Interactive Diagram Viewer — pan, mouse-wheel zoom, fit-to-screen, full-screen, per-module tabs, the full 209-relationship ERD, and a focus mode that draws one model and its neighbours at a chosen depth. Person (45 links), Organisation (18) and Document (16) fan out to nearly everything, so the viewer hides those links by default — a toggle brings them back. The diagrams below are the readable, static summary of the principal links only.
Architecture Overview
Nine areas mirror the sidebar menu. Every arrow means "one row of the left model is referenced by many rows of the right model".
flowchart LR
subgraph EXP["🗺️ Exploration & licences"]
Project --> ExplorationLicence --> ExplorationProgram --> Target
ExplorationLicence --> LicenceCondition
Project --> LandAccessAgreement
end
subgraph PLN["📐 Drill planning & holes"]
DrillPlan --> Drillhole
DrillSite --> Drillhole
Drillhole --> HoleCollarSurvey
Drillhole --> DownholeSurvey
end
subgraph OPS["⚙️ Drilling operations"]
DrillingContract --> RigAssignment
Rig --> RigAssignment
DrillingShift --> DrillingActivity
DrillingShift --> DrillingDelay
DrillingShift --> BitRun
DailyDrillingReport
HoleInterval
DrillingConsumableUsage
end
subgraph GEO["🪨 Geology & core"]
GeologyLog
AlterationLog
MineralisationLog
StructureLog
GeotechnicalLog
CoreRun
CoreTray --> CorePhoto
LithologyDictionary
end
subgraph SAM["🧪 Sampling & assay"]
Sample --> SamplingBatchItem
SamplingBatch --> SampleDispatch --> LaboratoryJob --> AssayResult
AssayResult --> QaqcEvaluation
ReferenceMaterial --> QaqcInsertion
StorageLocation --> SampleStorage
end
subgraph EQU["🔧 Equipment & maintenance"]
Equipment --> EquipmentMeterReading
InspectionTemplate --> Inspection --> InspectionResult
MaintenancePlan --> WorkOrder
InventoryItem --> InventoryTransaction
end
subgraph SFT["🦺 Safety, environment & rehab"]
RiskAssessment --> Hazard --> Control
Incident --> CorrectiveAction
EnvironmentalObservation
RehabilitationPlan --> RehabilitationActivity
RehabilitationPlan --> RehabilitationInspection
end
subgraph CMP["📋 Compliance & reporting"]
SourceAuthority --> SourceDocument --> Requirement --> RequirementApplicability
RegulatoryReport --> DataSubmission --> SubmissionFile --> ValidationIssue
ExpenditureRecord
end
subgraph ADM["🏢 Administration"]
Organisation --> Person
Jurisdiction
Document
Competency --> PersonCompetency
end
ExplorationProgram --> DrillPlan
Target --> DrillSite
Drillhole --> DrillingShift
Drillhole --> DailyDrillingReport
Drillhole --> HoleInterval
Drillhole --> GeologyLog
Drillhole --> CoreRun
Drillhole --> CoreTray
Drillhole --> Sample
ExplorationProgram --> SamplingBatch
SamplingBatch --> QaqcInsertion
Rig --> DrillingShift
Rig --> Equipment
DrillSite --> RehabilitationPlan
ExplorationLicence --> RegulatoryReport
The Drillhole Spine
Plan → site → hole → shifts → daily reports, with surveys fixing geometry.
erDiagram
ExplorationProgram ||--o{ DrillPlan : "exploration_program_id"
ExplorationProgram ||--o{ Drillhole : "exploration_program_id"
DrillPlan ||--o{ Drillhole : "drill_plan_id"
DrillSite ||--o{ Drillhole : "drill_site_id"
Target ||--o{ Drillhole : "target_id"
Drillhole ||--o{ Drillhole : "parent_hole_id"
Drillhole ||--o{ HoleCollarSurvey : "drillhole_id"
Drillhole ||--o{ DownholeSurvey : "drillhole_id"
Drillhole ||--o{ DrillingShift : "drillhole_id"
Rig ||--o{ DrillingShift : "rig_id"
DrillingShift ||--o{ DrillingActivity : "drilling_shift_id"
DrillingShift ||--o{ DrillingDelay : "drilling_shift_id"
DrillingShift ||--o{ BitRun : "drilling_shift_id"
Drillhole ||--o{ DailyDrillingReport : "drillhole_id"
Drillhole ||--o{ HoleInterval : "drillhole_id"
Geology Logging and Core Handling
Everything keys on the hole and a depth interval.
erDiagram
Drillhole ||--o{ GeologyLog : "drillhole_id"
Drillhole ||--o{ AlterationLog : "drillhole_id"
Drillhole ||--o{ MineralisationLog : "drillhole_id"
Drillhole ||--o{ StructureLog : "drillhole_id"
Drillhole ||--o{ GeotechnicalLog : "drillhole_id"
Drillhole ||--o{ CoreRun : "drillhole_id"
Drillhole ||--o{ CoreTray : "drillhole_id"
CoreTray ||--o{ CorePhoto : "core_tray_id"
StorageLocation ||--o{ CoreTray : "storage_location_id"
Sampling → Assay → QA/QC
Batch → custody → laboratory → results, with QA/QC deciding what stands.
erDiagram
Drillhole ||--o{ Sample : "drillhole_id"
Sample ||--o{ Sample : "parent_sample_id"
SamplingBatch ||--o{ SamplingBatchItem : "sampling_batch_id"
Sample ||--o{ SamplingBatchItem : "sample_id"
SamplingBatch ||--o{ SampleDispatch : "sampling_batch_id"
SampleDispatch ||--o{ ChainOfCustodyEvent : "sample_dispatch_id"
SampleDispatch ||--o{ LaboratoryJob : "sample_dispatch_id"
LaboratoryJob ||--o{ AssayResult : "laboratory_job_id"
Sample ||--o{ AssayResult : "sample_id"
AnalysisMethod ||--o{ AssayResult : "analysis_method_id"
ReferenceMaterial ||--o{ ReferenceMaterialValue : "reference_material_id"
SamplingBatch ||--o{ QaqcInsertion : "sampling_batch_id"
ReferenceMaterial ||--o{ QaqcInsertion : "reference_material_id"
AssayResult ||--o{ QaqcEvaluation : "assay_result_id"
QaqcInsertion ||--o{ QaqcEvaluation : "qaqc_insertion_id"
LaboratoryJob ||--o{ AssayValidation : "laboratory_job_id"
Sample ||--o{ SampleStorage : "sample_id"
StorageLocation ||--o{ SampleStorage : "storage_location_id"
Safety, Rehabilitation and Compliance
erDiagram
RiskAssessment ||--o{ Hazard : "risk_assessment_id"
Hazard ||--o{ Control : "hazard_id"
Incident ||--o{ CorrectiveAction : "incident_id"
Inspection ||--o{ InspectionResult : "inspection_id"
CorrectiveAction ||--o{ InspectionResult : "corrective_action_id"
DrillSite ||--o{ RehabilitationPlan : "drill_site_id"
RehabilitationPlan ||--o{ RehabilitationActivity : "rehabilitation_plan_id"
RehabilitationPlan ||--o{ RehabilitationInspection : "rehabilitation_plan_id"
SourceAuthority ||--o{ SourceDocument : "source_authority_id"
SourceDocument ||--o{ Requirement : "source_document_id"
Requirement ||--o{ RequirementApplicability : "requirement_id"
RegulatoryReport ||--o{ DataSubmission : "regulatory_report_id"
DataSubmission ||--o{ SubmissionFile : "data_submission_id"
SubmissionFile ||--o{ ValidationIssue : "submission_file_id"
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).- These static diagrams show principal links only — cross-cutting
references (
person_idroles on almost every model,document_idevidence links,organisation_id/project_idscoping) are omitted for readability. The interactive viewer's Full ERD shows all 209, with the people/organisation/document noise toggleable. Drillholeis the hub of the domain (24 direct children) — the viewer's Focus mode defaults to it.
Diagrams are derived from the generated schema metadata
(apps/minex_drill/generated/json/minex_drill_relationship_metadata.json).
If the DSL schema changes, regenerate the metadata (python -m codegen.cli
all minex_drill) and update this page and the viewer's embedded data.