From e78c37f98238a58740f41a271113cc4f040da632 Mon Sep 17 00:00:00 2001 From: Will Langdale Date: Fri, 1 Nov 2024 13:40:09 +0000 Subject: [PATCH] Minor change to ERD notes --- src/matchbox/server/postgresql/README.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/matchbox/server/postgresql/README.md b/src/matchbox/server/postgresql/README.md index 16f513c..ca3670b 100644 --- a/src/matchbox/server/postgresql/README.md +++ b/src/matchbox/server/postgresql/README.md @@ -6,11 +6,10 @@ Currently implements the following architecture. See Confluence for [further det `Models.type` is one of "model", "dataset" or "human". -We employ the following check constraints in Models: +There are two graph-like trees in place here. -* When type is "model", hash MUST NOT appear in Sources and MUST appear in ModelsFrom -* When type is "dataset", hash MUST appear in Sources and MUST appear in ModelsFrom -* When type is "human", hash MUST NOT appear in Sources and MUST NOT appear in ModelsFrom +* In the models subgraph the tree is implemented as closure table, enabling quick querying of root to leaf paths at the cost of redundancy +* In the data subgraph the tree is implemented as a hierarchy, which means recursive queries are required to resolve it, but less data is stored ```mermaid erDiagram