tortoise / tortoise-orm

Familiar asyncio ORM for python, built with relations in mind
https://tortoise.github.io
Apache License 2.0
4.5k stars 368 forks source link

Graphical drawings to understand the relationships in the database. #1296

Open anorprogrammer opened 1 year ago

anorprogrammer commented 1 year ago

Problem

Beginners don't understand the relationship when they use tortoise-orm for the first time. For example One-to-one, One-to-many, Many-to-many connections.

Solution

Most engineers use draw.io (or similar) for database design. I think database diagram designs should also be added to the examples for tortoise.github.io.

I drew a design in draw.io for tortoise-orm relations.

Draw

Above, FK is the foreign key, PK is the primary key.

tyler-yh commented 1 year ago

It would be nice if it was written using mermaid.