prisma / docs

📚 Prisma Documentation
https://www.prisma.io/docs
Apache License 2.0
983 stars 777 forks source link

Improve/remove confusing diagram in Relations overview docs #3592

Open keerlu opened 2 years ago

keerlu commented 2 years ago

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 commented 2 years ago

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

janpio commented 2 years ago

(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