Tribune

Home » Liferay Documentation

Vista Combinata Vista Piatta Vista ad Albero
Discussioni [ Precedente | Successivo ]
toggle
Grzegorz Kucner
Database documentation
27 luglio 2011 2.16
Risposta

Grzegorz Kucner

Punteggio: Junior Member

Messaggi: 38

Data di Iscrizione: 26 gennaio 2009

Messaggi recenti

Hi,

Where can I find database documentation for Liferay 6.0.6 CE database tables. I need to put documentation for each table and column which is used in Liferay installation into technical project documentation. It seems that there is no such documentation at all and I have to do it myself emoticon Which means I have to create big document describing each table and column one by one. Can anybody help me?
Leo Pratlong
RE: Database documentation
27 luglio 2011 2.35
Risposta

Leo Pratlong

Punteggio: Expert

Messaggi: 363

Data di Iscrizione: 6 luglio 2010

Messaggi recenti

Try Reverse Engineering with tool like Power AMC.
But since Liferay DB does not use foreign keys, I don't know if it will be efficient.

You can also find info in javadoc for each Model class.
Hitoshi Ozawa
RE: Database documentation
27 luglio 2011 2.39
Risposta

Hitoshi Ozawa

Punteggio: Liferay Legend

Messaggi: 7949

Data di Iscrizione: 23 marzo 2010

Messaggi recenti

Download the Liferay source and all the sql scripts are in the sql directory.

I think all members of this forum will greatly appreciate if you can contribute your finished documenation. :-)
Grzegorz Kucner
RE: Database documentation
27 luglio 2011 2.41
Risposta

Grzegorz Kucner

Punteggio: Junior Member

Messaggi: 38

Data di Iscrizione: 26 gennaio 2009

Messaggi recenti

Leo PRATLONG:
Try Reverse Engineering with tool like Power AMC.
But since Liferay DB does not use foreign keys, I don't know if it will be efficient.


That's my emergency plan, but this still a lot of work to do and for sure there will be problem describing some columns of workflow tables.

Leo PRATLONG:
You can also find info in javadoc for each Model class.

It is still incomplete as far as I know.
Mika Koivisto
RE: Database documentation
27 luglio 2011 15.51
Risposta

Mika Koivisto

LIFERAY STAFF

Punteggio: Liferay Legend

Messaggi: 1512

Data di Iscrizione: 7 agosto 2006

Messaggi recenti

First of all why would you have to document the database structure of a product your team didn't develop? It just doesn't make sense to me. For instance would you ask IBM for their documentation on the database schema Websphere portal uses?

Unfortunately we don't have any formal documentation of the database schema. The whole schema is generated from service.xml(s) by service builder. You can find the sql for your DB from the sql directory of the portal source like Hitoshi already mentioned.
Szymon Gołębiewski
RE: Database documentation
11 novembre 2011 15.01
Risposta

Szymon Gołębiewski

Punteggio: Regular Member

Messaggi: 247

Data di Iscrizione: 8 giugno 2009

Messaggi recenti

Any luck with this documentation Grzegorz?
Hitoshi Ozawa
RE: Database documentation
11 novembre 2011 17.38
Risposta

Hitoshi Ozawa

Punteggio: Liferay Legend

Messaggi: 7949

Data di Iscrizione: 23 marzo 2010

Messaggi recenti

Come to think of it, I think the best choice may be to just look at the service.xml file using Liferay IDE to gett the graphical entity relationships and the tables.
If you can't decipher it, I think there are many people who'll be able to do it for a fee.
Vasko T.
RE: Database documentation
28 novembre 2014 9.37
Risposta

Vasko T.

Punteggio: New Member

Messaggi: 2

Data di Iscrizione: 28 novembre 2014

Messaggi recenti

Mika Koivisto:
First of all why would you have to document the database structure of a product your team didn't develop? It just doesn't make sense to me. For instance would you ask IBM for their documentation on the database schema Websphere portal uses?

Unfortunately we don't have any formal documentation of the database schema. The whole schema is generated from service.xml(s) by service builder. You can find the sql for your DB from the sql directory of the portal source like Hitoshi already mentioned.


Why wouldn't you document the database? If you want your community to grow, you must make the code approachable and easy to understand by devs who are willing or otherwise obligated to work with your software.

I am a PHP/MySQL programmer, and I've been given the task to migrate a website from Liferay to WordPress. And since the old LR developers are not cooperative, I had to literally dig into the database to find the connections between articles, tags, categories and images. Guys, seriously? 215 tables?? And in each of them you have userid, user name, group id, and whatnot? A college student would have made a better and more normalized database design!

Who on earth thought this was a good relation?? journalArticle.resourcePrimKey (which btw is NOT the primary key) = AssetEntry.classPK then AssetEntry.entryId = assetEntries_assetCategories.entryid, then assetEntries_assetCategories.categoryId = assetCategories.categoryId ? Same for tags.. I spent days to figure this out! and I'm still trying to figure out the images... turns out for an article that has an image which is stored in DLFileEntry, that table connects through its primary key fileEntryId to, guess where? AssetEntry of course! Which field? Amazingly, classPK. And you have two totally unrelated records in AssetEntry for one article, one pointing to the JournalArticle table holding info about the article itself, and the other to DLFileEntry which holds info for the image that is placed in this article. Very smart, guys! I'm not gonna go further to what other super smart things I found..

You still think it's a bad idea to make a database documentation? Check this out: http://codex.wordpress.org/Database_Description nice and clear! As everything with WordPress! No wonder why WordPress community is ever-growing, and sites like the one I'm working on are migrating to WP.

Oh, that's right, after you've made a database of 215 tables with no relations (foreign keys) whatsoever, I doubt you know how it all works let alone write documentation for it...
Vasko T.
RE: Database documentation
28 novembre 2014 9.48
Risposta

Vasko T.

Punteggio: New Member

Messaggi: 2

Data di Iscrizione: 28 novembre 2014

Messaggi recenti

Forgot to mention, during the process of finding the relationships between articles with tags and categories, I asked 2 of my colleagues that are java developers for help, they also couldn't find the connection. In the end we installed a fresh copy of LR, created one article and looked at the db logs, searched and compared the ids created and that's how we found it.
Jack Bakker
RE: Database documentation
28 novembre 2014 10.22
Risposta

Jack Bakker

Punteggio: Liferay Master

Messaggi: 840

Data di Iscrizione: 3 gennaio 2010

Messaggi recenti

Vasko T.:

Why wouldn't you document the database? If you want your community to grow, you must make the code approachable and easy to understand by devs who are willing or otherwise obligated to work with your software.

I am a PHP/MySQL programmer, and I've been given the task to migrate a website from Liferay to WordPress. And since the old LR developers are not cooperative, I had to literally dig into the database to find the connections between articles, tags, categories and images. Guys, seriously? 215 tables?? And in each of them you have userid, user name, group id, and whatnot? A college student would have made a better and more normalized database design!

Who on earth thought this was a good relation?? journalArticle.resourcePrimKey (which btw is NOT the primary key) = AssetEntry.classPK then AssetEntry.entryId = assetEntries_assetCategories.entryid, then assetEntries_assetCategories.categoryId = assetCategories.categoryId ? Same for tags.. I spent days to figure this out! and I'm still trying to figure out the images... turns out for an article that has an image which is stored in DLFileEntry, that table connects through its primary key fileEntryId to, guess where? AssetEntry of course! Which field? Amazingly, classPK. And you have two totally unrelated records in AssetEntry for one article, one pointing to the JournalArticle table holding info about the article itself, and the other to DLFileEntry which holds info for the image that is placed in this article. Very smart, guys! I'm not gonna go further to what other super smart things I found..

You still think it's a bad idea to make a database documentation? Check this out: http://codex.wordpress.org/Database_Description nice and clear! As everything with WordPress! No wonder why WordPress community is ever-growing, and sites like the one I'm working on are migrating to WP.

Oh, that's right, after you've made a database of 215 tables with no relations (foreign keys) whatsoever, I doubt you know how it all works let alone write documentation for it...


Hi Vasko, feeling better after expressing this ?

WordPress is great for many web initiatives but it is not ranked that high as an Enterprise portal .. according to Gartner https://www.liferay.com/about-us/awards/gartnermq-portals

Starting by analyzing the database to try and get to get a basic intro to Liferay may not get you that far.

Good luck with your migration !