Skip to content

Relational databases for geotechnical data

Geotechnical data has a natural hierarchical structure that mirrors how ground investigations are actually performed. Understanding this structure—and how relational databases represent it, reveals why this approach is more flexible and powerful than traditional file-based formats like AGS.

The natural hierarchy of ground investigations

Section titled “The natural hierarchy of ground investigations”

Every ground investigation follows the same logical structure, from project level down to individual test results.

These hierarchical relationships can be visualized in a tree diagram like this:

Project Project Location Project/Location InSitu Project/Location/InSitu Sample Project/Location/Sample Lab Project/Location/Sample/Lab

This tree-like structure emerges naturally because:

  • Projects contain multiple investigation locations
  • Locations yield multiple observations/measurements and samples
  • Samples undergo multiple laboratory tests

Each level depends on the level above it, creating clear parent-child relationships throughout the dataset.

Relational databases represent hierarchical data

Section titled “Relational databases represent hierarchical data”

Relational databases are foundational to modern data management, and probably the most common type of database. They store data in linked tables, making them suitable for representing hierarchical structures. Each table represents one level of the hierarchy.

Every table has a primary key: a column that uniquely identifies each row:

  • project_uid in the Projects table
  • location_uid in the Locations table
  • sample_uid in the Samples table

Tables are linked through foreign keys: columns that reference primary keys in parent tables:

  • Locations table contains project_uid (linking to Projects)
  • In-situ test tables contain location_uid (linking to Locations)
  • Laboratory test tables contain sample_uid (linking to Samples)

Example: One project, multiple relationships

Section titled “Example: One project, multiple relationships”

Consider a project with 2 boreholes, where “Borehole 1 (BH001)” has 3 samples:

Projects table:

project_uidhorizontal_crsvertical_crs
P001EPSG:2326EPSG:5738

Locations table:

location_uidproject_uideastingnorthingdepth_to_baseground_level_elevation
BH001P0015234411816525.420.5
BH002P0015234671816786.819.8

Samples table:

sample_uidlocation_uidproject_uid
S001BH001P001
S002BH001P001
S003BH001P001

This creates one-to-many relationships: one project has many locations, one location has many samples, etc.

Query power: SQL enables complex queries across multiple tables:

Concurrent access: Multiple users can query and update data simultaneously

Extensibility: Easy to add custom fields without breaking existing structure

Integration: Direct connectivity with GIS software, analysis tools, and web applications