Page 1 of 1

Joomla ERD: a present to the new Baby

Posted: Mon Sep 19, 2005 11:59 am
by gizmola
;D

I'm doing something I hope will be of value to the Joomla community, whether you're working on the core, plugins, or you are a site developer.  My contribution is a Joomla Entity Relationship Diagram (ERD).

I've reversed the Joomla 1.0 database into an ERD tool.  Unfortunately it can't infer relationships, so I'm going through putting those back together, and documenting the ERD. The diagrams use IE notation.

I like to include data from any "lookup" tables, as well as sample data, whenever it really seems to help explain what the table is designed to do.  I'm also including notes about things I am unsure of.

I am breaking this up into subject area pieces.  I may be able to provide a complete diagram once I'm finished, but I also find it beneficial to have smaller subject areas.

First off, please understand I'm relatively new to Joomla.  If I'm getting anything wrong, don't hesitate to let me know.
When the diagram is complete I'll look at rendering it to a pdf to make it easier for people to print. 

I hope these diagrams will be useful to the Joomla community now and in the future.

*Latest*
We're in the process of integrating this into the developers manual.  I've created a single pdf with all the views, which prints out nicely on 8.5x11 paper.  Until the file is available from the manual, you can get it here: 

Combined ERD

Re: Joomla ERD: a present to the new Baby

Posted: Mon Sep 19, 2005 12:07 pm
by bluesaze
Man wow these are better than the diagrams generated by the dev team given in the documentation .....hope the core team notices ...... should be darn helpful

Re: Joomla ERD: a present to the new Baby

Posted: Mon Sep 19, 2005 12:14 pm
by friesengeist
Interesting project.

My comment on the userview: I would concentrate more on the ACL-Stuff, since that is gonna replace the jos_usertypes and jos_groups-tables finally.

Re: Joomla ERD: a present to the new Baby

Posted: Tue Sep 20, 2005 10:49 pm
by gizmola
I've just updated the Users view, and believe it to be correct. I'd appreciate it if people familiar with the user system could look it over and check it for accuracy.

http://www.gizmola.com/blog/uploads/ima ... _users.jpg

Re: Joomla ERD: a present to the new Baby

Posted: Wed Sep 21, 2005 7:02 pm
by gizmola
Ok, the Joomla Base ERD is complete.  If I find any issues, or learn anything new that requires me to change any of these, I'll update them and leave a message here.  Hope they're of help.

Re: Joomla ERD: a present to the new Baby

Posted: Tue Oct 04, 2005 4:10 am
by charlwillia6
Thanks Gizmola.

Great contribution.  You should tell someone from the developer docs and see if they can make this a sticky or incorporate it somewhere so it doesn't get buried.

Charles

Re: Joomla ERD: a present to the new Baby

Posted: Tue Oct 04, 2005 5:15 am
by gizmola
Thanks for the vote of confidence. I have joined the developer documentation team, and we're working on getting the diagrams into the developer documentation area.

Re: Joomla ERD: a present to the new Baby

Posted: Wed Oct 05, 2005 3:09 am
by thisearly
Im in for translations to spanish and any documentation that needs to be done. Just let me know.

Re: Joomla ERD: a present to the new Baby

Posted: Mon Oct 17, 2005 10:19 am
by antmat
Hi everybody,
I saw the ERD diagram of the users relationships and I have a question about the relation between the
jos_usertypes table with the jos_users table.
In fact, observing the database, the field jos_users.usertypes seems to be related to the jos_core_acl_aro_groups table
and not to the jos_usertypes table.
If this is true,  which is the role of the jos_usertypes table ?

Thanks
Matteo

Re: Joomla ERD: a present to the new Baby

Posted: Mon Oct 17, 2005 11:55 pm
by gizmola
Thanks for bringing this question up.

I've dug into the code, and restructured the diagrams a bit now that I've seen what's been going on.  From searching the codebase, _usertypes is not used.  The values in the usertype.name column seem to vaguely correspond to values both in the core_acl_aro_groups.name column and in the user.usertype column, although there isn't really any match.  When I searched the code for .usertype, I only found it being compared to some hardwired constants. 

I did however, discover that jos_groups is only used as a way of constraining the content table, and also found that core_acl_aro_groups is related to users.  This has helped improve that section of the model considerably.

I'm regenerating that view, and will have a replacement uploaded shortly.  I've also noted that the usertypes table doesn't seem to be used.

Re: Joomla ERD: a present to the new Baby

Posted: Tue Oct 18, 2005 12:13 am
by gizmola
User View and Content View have been updated, reflecting corrections regarding _groups and _usertypes tables.  Now correctly links _users to core_acl_aro_groups table.

Re: Joomla ERD: a present to the new Baby

Posted: Thu Oct 20, 2005 2:02 am
by guilliam
wow! big thanks mate!

Re: Joomla ERD: a present to the new Baby

Posted: Wed Nov 16, 2005 1:55 pm
by lochball
tks gizmola for this helpful piece of information...  8)

Re: Joomla ERD: a present to the new Baby

Posted: Wed Nov 16, 2005 2:41 pm
by gizmola
Views now are integrated into a single pdf.

Re: Joomla ERD: a present to the new Baby

Posted: Fri Oct 27, 2006 1:24 pm
by blaco
Hello anybody, I find this scheme very usefull but  I'm just searching something a bit different... I mean that I need the e/r scheme for the joomla db, could anyone help me?