Foros de discusión

Database documentation

thumbnail
Grzegorz Kucner, modificado hace 12 años.

Database documentation

Junior Member Mensajes: 39 Fecha de incorporación: 26/01/09 Mensajes recientes
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?
thumbnail
Leo PRATLONG, modificado hace 12 años.

RE: Database documentation

Expert Mensajes: 363 Fecha de incorporación: 6/07/10 Mensajes recientes
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.
thumbnail
Grzegorz Kucner, modificado hace 12 años.

RE: Database documentation

Junior Member Mensajes: 39 Fecha de incorporación: 26/01/09 Mensajes recientes
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.
thumbnail
Hitoshi Ozawa, modificado hace 12 años.

RE: Database documentation

Liferay Legend Mensajes: 7942 Fecha de incorporación: 24/03/10 Mensajes recientes
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. :-)
thumbnail
Mika Koivisto, modificado hace 12 años.

RE: Database documentation

Liferay Legend Mensajes: 1519 Fecha de incorporación: 7/08/06 Mensajes recientes
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.
Vasko T., modificado hace 9 años.

RE: Database documentation

New Member Mensajes: 2 Fecha de incorporación: 28/11/14 Mensajes recientes
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., modificado hace 9 años.

RE: Database documentation

New Member Mensajes: 2 Fecha de incorporación: 28/11/14 Mensajes recientes
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.
thumbnail
Jack Bakker, modificado hace 9 años.

RE: Database documentation

Liferay Master Mensajes: 978 Fecha de incorporación: 3/01/10 Mensajes recientes
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 !
thumbnail
Szymon Gołębiewski, modificado hace 12 años.

RE: Database documentation

Regular Member Mensajes: 246 Fecha de incorporación: 8/06/09 Mensajes recientes
Any luck with this documentation Grzegorz?
thumbnail
Hitoshi Ozawa, modificado hace 12 años.

RE: Database documentation

Liferay Legend Mensajes: 7942 Fecha de incorporación: 24/03/10 Mensajes recientes
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.