Hi guys,

Just wondering if there is a Drupal architecture diagram(s) - I think some nice diagrams would help understanding how everything fits together.

I'm thinking class diagram, rendering pipeline (sequence diagram?) ER diagram for the database etc.

Always good to keep a systems documentation up to date

cheers,
neko

Comments

moshe weitzman’s picture

we don't have anything like that, as far as I know. Something as elegant as Drupal does deserve some pretty diagrams though. Hope someone is inspired to produce this.

Anonymous’s picture

Here Here! Excellent thoughts. The diagrams are a real MUST have!

Anonymous’s picture

(just stumbled in by random)

Isn't the diagram a help to create the database? Not the other way around?? Just skip the diagram guys! You should have had it before you made the database!

chaska@blogger.com’s picture

It's always good to have documentation, even if it is written after the fact, instead of before.

As for an Entity-Relationship (ER) diagram of the database, it is definitely worth having even after the database is made. It makes the database easier to understand for someone new to working on Drupal. And if there is every any change to the database, it will be just as invaluable as having created it before the first database.

If you've got an ER tool, it's even better because you can reverse engineer the current database into an ER diagram, and then generate the database after making changes in the tool to the diagram.

Is the database relatively normalized (e.g. 3rd or 4th normal form) for most of the tables? If so, I've got Sybase's Power Designer here and can reverse engineer the database with a little help on getting the non-obvious relationships connected.

Anonymous’s picture

Try downloading dbdesign from fabforce,com. It's GPL, windows app, and is a pretty good ER diagrammer designed for MySQL and can reverse engineer a database into a diagram very well. I tried it on the Drupal db and it worked fine.

emerygjr’s picture

It is fabforce,net

Emery Gordon

ax’s picture

made by slavica here

kenyob’s picture

Does anyone have a copy of the image posted above?

I found the old link on archive.com but the ERD PNG image isn't available:
http://web.archive.org/web/20041114055745/drupal.org/node/1805

Im looking for a simple diagram showing how the template system works together.
Its kind of comfusing because the tpl files use php variables like $content .
However other than hackinf through the css and php code there is no way to see how one tpl file fits and relates to another along with the CSS related elements.

ChrisKennedy’s picture

Jeff Eaton has some great diagrams on aspects of the Drupal system, primarily the FormAPI:

Development cycle - http://jeff.viapositiva.net/node/477
Drupal form processing - http://jeff.viapositiva.net/node/457 (see attached image)
FormAPI 3.0 - http://drupal.org/node/138706#comment-233445 and http://drupal.org/node/138706#comment-233448

Edit: wow, I didn't notice initially that this was such an ancient topic.

arman’s picture

Greetings,

I'm looking for Drupal Architecture diagrams for a document I'm putting together.

If there are none I'll draw em up and contribute them back.

Any new updates on this front.

Arman.

colin_e’s picture

I've just negotiated with the supplier of a Drupal-hosted site a regular export of the database for reporting purposes. I think i'm going to be wandering around in the dark without some clues on the db structure, so please do post any diagrams.

(This is Drupal 5 BTW, I assume 6 is significantly different?)

Regards: Colin

mgifford’s picture

I found this earlier today, but had hoped that there would be more options.

http://www.typo.co.il/~mooffie/tmp/schemagraph/output/schemagraph-2007-1...

omerle’s picture

or where can I find a smaller pic?
the whole scheme is quite enormous and I'm just looking for bits and pieces.

10x,
Omer

gaellafond’s picture

Thank you, that's exactly what I was looking for. You just save me hours of work!
Unfortunately, the diagram do not include the content module (CCK group). I will have to search more or create it by myself...

[modify]
I just discovered a wonderful tool call schemaspy. It create the schema automatically for you.
http://schemaspy.sourceforge.net/

There is an example of what it can produce:
http://webdevgeeks.com/schemaspy/index.html

izmeez’s picture

@gaellafond, Thanks for the link to this interesting tool.

vacho’s picture

excellent, a good data dictionary drupal BD

willhallonline’s picture

This looks like a good tool. I am doing a presentation on "migration to drupal" and a quick way to generate a diagram is fantastic as I certainly prefer looking at diagrams to understand the relational nature of databases than just looking at the data. I am going to try this out on a few database configurations (with cck/views/some seo modules etc) i will sort out the diagrams and repost where I can. Great find.

carlpr’s picture

Using Google's image search, I found an Entity Relationship Diagram (ERD) for Drupal 5 here:
http://drupal.org/files/issues/Drupal5RC1_Database.png

HTH

Thanks,
Carl

lancsDavid’s picture

  1. maps are objects for understanding terrain
  2. computer software is very complex terrain
  3. if maps aren't attractive objects in themselves it makes studying them much harder

for these reasons i reckon a combination of a (shorter) bayeaux tapestry, the london underground map & the Entity relationship diagram is needed to make drupal properly understandable in as short a time as possible

nothing short of a new evolution in map making

i mean, the more complex the terrain then surely, the greater the need for a good map?

( not that i ever get the impression there's much of an appetite for this kind of stuff in the drupal community. in my experience its pretty much a community of programmers/developers. not designers/artists )

hanoverhr’s picture

Our team is working on a completed ER/DB map for Drupal 6 (at least for core, and the modules we use). It's being done by hand, as we could not find a good analysis program...can't believe this is not out there somewhere already. It is critical for migrations and DB translations/overlay (we need it for this purpose).

Once we have something in the next month or so, we'll post it here! A lot of scanned sheets, but it might help someone!

Regards --
Sean

werfu’s picture

This is the best I could find. I guess its better than nothing and cover most core functionalities.

http://knownexception.blogspot.com/2009/12/drupal-6x-approx-core-databas...

nvedia’s picture

Thanks werfu!

Sree’s picture

This might also be helpful to understand the architecture: http://www.aspiringcraftsman.com/2007/08/25/interactive-application-arch...

-- Sree --
IRC Nick: sreeveturi

grahamvalue’s picture

Please note that the above link has moved to Drupal 6.x approx core DB/ER diagram.

aosiname’s picture

I asked a similar question a while ago specifically about the database diagram. Using MySQL Workbench free software - I was able to reverse-engineer a Moodle MySQL database - so I assume you can do it to Drupal - takes a while moving all the tables around and you need a pretty huge monitor but its well worth it.

ursula’s picture

I created a data model for the standard-install of Drupal 7 using MySQL workbench, and also collected some links to other drupal data models.

http://upsitesweb.com/blog/2011/06/drupal-7-database-schema

The purpose was to familiarize myself with the data structure. Maybe, it is helpful for others as well.

Alejo’s picture

I always been looking for something like that!!! thanks a lot!!!

goldenflower’s picture

izmeez’s picture

Thank you for sharing the link to the file by John VanDyk, very nice.

sujoyit2005’s picture

Excellent PDF and very easy to understand as well for the clients!

Anonymous’s picture

I think someone should go through and scratch the dead links on this page. There are quite a few links that are 404's.