Best way to extract ERD for Modules

Dear community,

I would like to extract ERD for certain tables. For example the HR ERD, the relationship is not defined in the .sql database, the only relationship definitions that I found are in the Modules in the doctype folder, and each module is connected in the .json file such as payroll_employee_detail module fetches the department from "fetch_from": "employee.department",
or from something as
"oldfieldname": "department_name",
"oldfieldtype": "Data",

I’ve read many articles talking about using tools such as MySQL workbench, but it only draws the tables without any relations between them because they are not defined in the database. How can I draw the ERD? should I use mySQL workbench plus other tools? should I somehow figure it out from the .json files? are there any tools or procedurals to achieve the ERD?

@Yousef the ERD over frappe, is an hard task, because the ORM of frappe.

Frappé dont have the concept of Records, but the concept of Documents.
When you look for the data of an Sales Invoice, you got the main record and all children records.

That information is already stored into the database, but depends of DocFields of type (Table, Links and Dynamic Links`)

The best documentation is that

It’s kinda outdated, but is easy to regenerate the data to update that report.

1 Like