From: | JORGE MALDONADO <jorgemal1960(at)gmail(dot)com> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | Help to design relations between some 5 tables with possible many-to-many relations |
Date: | 2021-06-21 19:07:17 |
Message-ID: | CAAY=A78MG4iRmdLxrXO_jB_3FOqfd0Mvrv_y1AkEksAk0YPoNw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Hi,
I have the following tables: *reports*, *standards*, *elements*, *tables*,
*items*.
* One *report* has many *standards*.
* One *standard* has many *elements*.
* One *element* has many *tables*.
* One *table* has many *items*.
*Reports* are generated yearly and current year might have exactly the same
*standards* as last year but not necessarily. Maybe, the current year
*report* includes part of last year's report *standards* and also includes
new *standards*. Or maybe, the current year report includes only a subset
of last year *reports* *standards*. Or maybe, the current report has a
totally new set of standards.The same behavior is true between *standards*
and *elements*, between *elements* and *tables* and between *tables* and
*items*. I see that many-to-many relations exist between all of the tables
but I am not able to clearly visualize.
I am a bit confused about how to design this part of my DB. I hope my
explanation is clear enough. I will very much appreciate your feedback.
Respectfully,
Jorge Maldonado
From | Date | Subject | |
---|---|---|---|
Next Message | David G. Johnston | 2021-06-21 19:25:24 | Re: Help to design relations between some 5 tables with possible many-to-many relations |
Previous Message | Erik Brandsberg | 2021-06-17 14:22:34 | Re: Listen and notify in psql process |