xoops forums

valimaggi

Just popping in
Posted on: 2009/8/7 9:47
valimaggi
valimaggi (Show more)
Just popping in
Posts: 10
Since: 2009/8/4 6
#1

Structure and relational model of the XOOPS database

(I couldn't find any better subforum for this question)

Hello, I'm Mikko from TUT (Tampere University of Technology), Finland.

I'm doing my thesis work and part of it got to do with XOOPS-based webdatabase for research data. One part of that is to analyze the database used. I'm talking about reverse-engineering the database tables back to relational and eventually conceptual models. I can't find anywhere any kind of documentation about database XOOPS uses. I can use MySQL to see what tables are in the database but can't figure out anything much further from that.

So my question is, do developers have any documentation about the database structure and its development (conceptual and relational models). Or is there anyone who I can contact to and ask further about this things? (if the documentation is completely missing)

I'd be very grateful if someone can help me on this.

Best regards

Mikko V

ghia

Community Support Member
Posted on: 2009/8/7 11:48
ghia
ghia (Show more)
Community Support Member
Posts: 4954
Since: 2008/7/3 1
#2

Re: Structure and relational model of the XOOPS database

valimaggi, Welcome to the XOOPS forum!

I'm affraid there is not much documentation about these things. XOOPS is like an organic growth out of PHPNuke and has been extended during almost 10 years by several developers. The various alterations in the database, were done mostly out of practical need and not so much out of conceptual or relational thinking. And if they where, these concepts were not so much discussed, nor documented.

I think the only thing lerft is reverse engineering: following the queries. All sources are available and included in the downloads. For the core, most relations have to do with modules and user(group)s for dealing with preferences and permissions.

There are also some people trying to discover the design patterns beyond XOOPS. Anyway, we look forward to read the results of your research.

bumciach

Not too shy to talk
Posted on: 2009/8/7 13:06
bumciach
bumciach (Show more)
Not too shy to talk
Posts: 153
Since: 2007/6/25
#3

Re: Structure and relational model of the XOOPS database

I used to use DBDesigner4 for reverse engineering. Create nice diagrams. Enough to click the relationship. At least in the XOOPS core tables can find them easily on the column titles.
DBDesigner4 was replaced by MySQL Workbench. The community edition has no reverse engineering, but easily import models from DBDesigner4.

valimaggi

Just popping in
Posted on: 2009/8/12 12:48
valimaggi
valimaggi (Show more)
Just popping in
Posts: 10
Since: 2009/8/4 6
#4

Re: Structure and relational model of the XOOPS database

Thank you for your replies ghian and bumciach!

I feared that my be the case with the documentation ghian. I'm puzzled with that "following the queries" though. I couldn't find any queries in my web server folder where I have my XOOPS files (if you meant sql query files or something?) Where these sources are available which you mentioned?

I was able to get DBDesigner4 working and get the table model from my XOOPS database. It's just a bit difficult-to-use-software because the GUI is somehow not right (perhaps got to do with the Linux version perhaps), all the texts in every dialog and pane and everywhere are partly hidden. It's like the it's not been correctly done to Linux or something.

http://img14.imageshack.us/img14/7648/dbddesignerscrnsht.png

BTW, I couldn't get Workbench installed (I don't have for example package called "libzip", probably some other packages too are missing). bumciach, do you know what all I need to get it working on my Linux (CentOS). I have to install everything as tar.gz sources because it's forbidden to use yum and that kind of stuff with my computer (maintenance has put this kind of order if people want to install own software, which they won't maintain)

ghia

Community Support Member
Posted on: 2009/8/12 13:09
ghia
ghia (Show more)
Community Support Member
Posts: 4954
Since: 2008/7/3 1
#5

Re: Structure and relational model of the XOOPS database

Quote:
I'm puzzled with that "following the queries" though. I couldn't find any queries in my web server folder where I have my XOOPS files (if you meant sql query files or something?)
It is looking in the PHP sources (search for the word query) and find the relations by the used variables from one query to the other. This way you find that eg uid and user_id are both user identifiers.
Quote:
Where these sources are available which you mentioned?
The sources are on your system, if you have XOOPS running, starting at the webroot (or some subdirectory of it). A maybe more convenient way to access this is the source cross reference (DoxyGen) at XooFoo.

bumciach

Not too shy to talk
Posted on: 2009/8/12 14:13
bumciach
bumciach (Show more)
Not too shy to talk
Posts: 153
Since: 2007/6/25
#6

Re: Structure and relational model of the XOOPS database

I'm sorry, I can not help here. I use this two progs on Windows only.

valimaggi

Just popping in
Posted on: 2009/8/13 13:22
valimaggi
valimaggi (Show more)
Just popping in
Posts: 10
Since: 2009/8/4 6
#7

Re: Structure and relational model of the XOOPS database

Quote:

It is looking in the PHP sources (search for the word query) and find the relations by the used variables from one query to the other. This way you find that eg uid and user_id are both user identifiers.

The sources are on your system, if you have XOOPS running, starting at the webroot (or some subdirectory of it). A maybe more convenient way to access this is the source cross reference (DoxyGen) at XooFoo.


Thanks for the reply.

I used that DoxyGen and searched for "query". It found over 300 hits with that. I don't know how to start exactly. Do you mean I search every place which has sql-query written? And with them I try to figure out the relations between the tables?

iHackCode

Module Developer
Posted on: 2009/8/13 14:26
iHackCode
iHackCode (Show more)
Module Developer
Posts: 1036
Since: 2004/6/29
#8

Re: Structure and relational model of the XOOPS database

i would first look through the kernel folder and look at the objects and their handlers. the class hierarchy diagram in doxygen could be useful.

valimaggi

Just popping in
Posted on: 2009/8/24 10:52
valimaggi
valimaggi (Show more)
Just popping in
Posts: 10
Since: 2009/8/4 6
#9

Re: Structure and relational model of the XOOPS database

Thanks for the advice, I did that. But I really can't get much out of it, there isn't mentioned the word "query" even once in kernel "doxygenated" documentation.

I mean I can get the hierarchy diagram by doxygen but it doesn't help me much with the table structure problem.

ghia

Community Support Member
Posted on: 2009/8/24 11:59
ghia
ghia (Show more)
Community Support Member
Posts: 4954
Since: 2008/7/3 1
#10

Re: Structure and relational model of the XOOPS database

Humm, tought there was a function reference also, but apparently not.
Then you have to use an editor like Notepad++, which is able to search in the files of all (sub)directories.