Databases: How can I produce ERD?

Databases: How can I produce ERD?

Ahmed Aljeaidan -
回帖数:7

Hi all

I need help for produce the ERD of my Moodle.

Anyone can help me with the right tools.

Ahmed Aljeaidan

arabopenuniversity@hotmail.com

回复Ahmed Aljeaidan

Re: Databases: How can I produce ERD?

Hoàng Đức Cường -
I'm need ERD of Moodle1.8 too! Please help us!!! Thanks a lots!!!
回复Hoàng Đức Cường

Re: Databases: How can I produce ERD?

Gert Sauerstein -
As explained in http://moodle.org/mod/forum/discuss.php?d=3935#p116851 the moodle database is not normalized. So the ERD does not cover all relations between entities, some relations are only built up by PHP scripts.

In my opinion this is the reason why ANY entity relationship diagram will not be useful for understanding the database. It will be better to look directly into the database AND the moodle source code to find all existing releations.
回复Ahmed Aljeaidan

Re: Databases: How can I produce ERD?

Hoàng Đức Cường -
回复Hoàng Đức Cường

Re: Databases: How can I produce ERD?

Tiogshi Laj -
Yes, that's all fine and good for people who can run Database Designer 4, but it just plain doesn't run on my linux distribution, and the software itself is overblown and unnecessary for most developers.

Could someone kindly post something a little more tangible, like either a wiki topic describing the current version's DB schema, or even just the output of "SHOW CREATE TABLE ~;" from a database client?

I especially ask because I'm developing a remote access component which will run from a parallel server, but I don't want to install a complete Moodle distribution on my workstation to do that. All I need is the schema, in plain and simple text.
回复Tiogshi Laj

Re: Databases: How can I produce ERD?

Tim Hunt -
Core developers的头像 Documentation writers的头像 Particularly helpful Moodlers的头像 Peer reviewers的头像 Plugin developers的头像
It is very easy to install 'a complete Moodle distriution' - you make it sound like installing a whole new operating system. It is really not that hard.

Certainly, installing your own copy of Moodle would be the easiest way to find out the information you want.

No one is going to bother documenting the database structure on the wiki, becuase details of it keep changing.

If you insist on working from text files, look at the install.xml files dotted around the database. The Moodle database is actally very modular, which it is why it is defined in different bits. The core tables are defined in lib/db/install.xml.