I have a PostgreSQL 12 database with a largely hierarchical design. The tables are related something along these lines: study -> group -> subject -> sample -> assay