From 892166abfff464e225fa46e5722441d9a8afbe30 Mon Sep 17 00:00:00 2001 From: Gregory Dubois-Felsmann Date: Mon, 5 Feb 2024 10:16:11 -0800 Subject: [PATCH] Add Mermaid diagram of a draft entity-relationship model for DP0.2 Eventually we should try to generate this automatically from Felis. --- doc/dp02_dc2.mmd | 64 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 doc/dp02_dc2.mmd diff --git a/doc/dp02_dc2.mmd b/doc/dp02_dc2.mmd new file mode 100644 index 00000000..bf32c7b6 --- /dev/null +++ b/doc/dp02_dc2.mmd @@ -0,0 +1,64 @@ +--- +title: DP0.2 Table Relationships +--- +erDiagram + Object { + long objectId UK + long tract FK + long patch FK + } + Object ||--o{ MatchesTruth : matches + Object }o..|| CoaddPatches : "found in" + Object ||--|{ ForcedSource : seeds + + Source { + long ccdVisitId FK + long visit FK + } + Source }o..|| CcdVisit : "found in" + Source }o..|| Visit : "found in" + ForcedSource { + long objectId FK + long ccdVisitId FK + long tract FK + long patch FK + } + ForcedSource }o..|| CcdVisit : "measured in" + DiaObject { + long diaObjectId UK + long nDiaSources + } + DiaObject |o..|{ DiaSource : "built from" + DiaObject ||--|{ ForcedSourceOnDiaObject : "seeds" + DiaSource { + long diaObjectId FK + long ccdVisitId FK + } + DiaSource }o..|| CcdVisit : "found in" + ForcedSourceOnDiaObject { + long diaObjectId FK + long ccdVisitId FK + long tract FK + long patch FK + } + ForcedSourceOnDiaObject }o..|| CcdVisit : "measured in" + CcdVisit { + long ccdVisitId UK + long visitId FK + } + Visit { + long visit UK + } + Visit ||--|{ CcdVisit : contains + CoaddPatches { + long lsst_tract PK + long lsst_patch PK + } + MatchesTruth { + string id_truth_type FK + long match_objectId FK + } + TruthSummary { + string id_truth_type PK + } + TruthSummary ||--o{ MatchesTruth : matches