docs icon indicating copy to clipboard operation
docs copied to clipboard

Improve/remove confusing diagram in Relations overview docs

Open keerlu opened this issue 2 years ago • 2 comments

On our "Relations" page on the other hand we have a pretty confusing ERD that should help understand a specific data model, but is actually pretty weird: https://www.prisma.io/docs/concepts/components/prisma-schema/relations#:~:text=For%20relational%20databases%[…]o%20the%20sample%20Prisma%20schema%3A

  • The examples uses an implicit m:n relation which is a (kinda weird) Prisma only concept, so def does not help users understand
  • Because of that one of the shown tables in the ERD is not actually present in the data model (the implicit join table)
  • And finally what is labelled m:n is actually just the join table, instead the m:n relation is the sum of these three tables and the two 1:n relations between them
  • Generally this level of detail is a bit weird - the section itself is called "relation fields"

https://prisma-company.slack.com/archives/C5Z9TH6N9/p1659726540023929 (includes annotated screenshot)

keerlu avatar Aug 11 '22 09:08 keerlu

Could be looked at at the same time as #3591.

keerlu avatar Aug 11 '22 09:08 keerlu

(Just to make a point for an internal discussion)

On our "Relations" page on the other hand we have a pretty confusing ERD that should help understand a specific data model, but is actually pretty weird: https://www.prisma.io/docs/concepts/components/prisma-schema/relations#:~:text=For%20relational%20databases%[…]o%20the%20sample%20Prisma%20schema%3A

  • The examples uses an implicit m:n relation which is a (kinda weird) Prisma only concept, so def does not help users understand
  • Because of that one of the shown tables in the ERD is not actually present in the data model (the implicit join table)
  • And finally what is labelled m:n is actually just the join table, instead the m:n relation is the sum of these three tables and the two 1:n relations between them
  • Generally this level of detail is a bit weird - the section itself is called "relation fields"

janpio avatar Aug 11 '22 15:08 janpio