Foros de discusión

Information on Liferay and Liferay DB

Guru patil, modificado hace 10 años.

Information on Liferay and Liferay DB

Regular Member Mensajes: 163 Fecha de incorporación: 19/04/13 Mensajes recientes
Hi All,


I want the information on the Liferay, If I do some operations which tables are getting updated or values are getting inserted

At least there is any documentation on the Database tables. I want to know what is the purpose of each table in liferay,

Is there any documentation on this.

Any help or link or doc will be help full.
Hope positive results.


Thanks
thumbnail
David H Nebinger, modificado hace 10 años.

RE: Information on Liferay and Liferay DB

Liferay Legend Mensajes: 14914 Fecha de incorporación: 2/09/06 Mensajes recientes
This is not available. You should not be in the database at all.

Like any other commercial package, Liferay uses a database but it should be considered a 'black box'. It is their resource, not yours to muck around with.

The only thing you should be using is the Liferay API. That is the only place you should be in to access, modify, or delete data. The internals of the API are subject to change in every new release. Only the API will ensure data integrity.
thumbnail
dave ch, modificado hace 10 años.

RE: Information on Liferay and Liferay DB

Regular Member Mensajes: 161 Fecha de incorporación: 7/02/12 Mensajes recientes
Hi Guru,
Once you complete your LR setup with your DB you can see all the tables in your DB.
About any updated tables, its basically depends upon your type of operation. Once you start using liferay (plugins) slowly you will come to know about where your values are getting updated.

Regards
thumbnail
Mika Koivisto, modificado hace 10 años.

RE: Information on Liferay and Liferay DB

Liferay Legend Mensajes: 1519 Fecha de incorporación: 7/08/06 Mensajes recientes
Don't mess with the database. Use the API.
Guru patil, modificado hace 10 años.

RE: Information on Liferay and Liferay DB

Regular Member Mensajes: 163 Fecha de incorporación: 19/04/13 Mensajes recientes
Hi All,

Thanks for suggestion.

I just wanted to know the information on the database tables.
What is purpose of each table and how they are inter-related.

For example user information is stored in user_table.

So am just searching for these kind of simple data.
thumbnail
Manish Yadav, modificado hace 10 años.

RE: Information on Liferay and Liferay DB

Expert Mensajes: 493 Fecha de incorporación: 26/05/12 Mensajes recientes
Guru patil:
Hi All,

Thanks for suggestion.

I just wanted to know the information on the database tables.
What is purpose of each table and how they are inter-related.

For example user information is stored in user_table.

So am just searching for these kind of simple data.


Hi Guru, David and Mika want to advise you try to learn about LR API instead to DB tables for eg:- if you want to delete any user from LR then you should you UserLocalServiceUtil.deleteUser() method instead of SQL delete query because User_ table is mapped with other tables(Primary and foreign key relationship)

Thanks & Regards
Manish Yadav
eresh k, modificado hace 10 años.

RE: Information on Liferay and Liferay DB

Junior Member Mensajes: 26 Fecha de incorporación: 17/06/13 Mensajes recientes
Hi Guru,

If you are using the Liferay from quite a long time and as per the experience, you can came to know which tables are used in Liferay for which purposes.
For Example Organisation data is saved in organisation_ table.
etc

So as you keep on exploring the liferay you can easily find out the purpose of each table.
thumbnail
David H Nebinger, modificado hace 10 años.

RE: Information on Liferay and Liferay DB

Liferay Legend Mensajes: 14914 Fecha de incorporación: 2/09/06 Mensajes recientes
eresh k:
If you are using the Liferay from quite a long time and as per the experience, you can came to know which tables are used in Liferay for which purposes.
For Example Organisation data is saved in organisation_ table.


And if you really had used Liferay for a long time, you'd know that Eresh's statement is only valid for the current version of Liferay that you're using. You'd know that Liferay will deprecate or repurpose tables/columns with each release. You'd know that during the upgrade process existing data may be changed/coerced to conform to the new API, and you'd also know that the API is the only way to correctly perform CRUD operations against the database.

Do yourselves a favor and just stay out of the database altogether.
thumbnail
James Falkner, modificado hace 10 años.

RE: Information on Liferay and Liferay DB

Liferay Legend Mensajes: 1399 Fecha de incorporación: 17/09/10 Mensajes recientes
David H Nebinger:

Do yourselves a favor and just stay out of the database altogether.


I'd just like to pile on with additional dangers - a lot of data is cached "above" the database, so making changes to the DB directly is likely going to cause problems, because those upper level caches aren't expecting you to do that, and won't invalidate their caches, leading to incorrect results all over the place.
thumbnail
Olaf Kock, modificado hace 10 años.

RE: Information on Liferay and Liferay DB

Liferay Legend Mensajes: 6396 Fecha de incorporación: 23/09/08 Mensajes recientes
...and, adding more arguments: If you add new entries to the database, you might trigger "duplicate primary key" errors. The tricky part of those is that they can appear *months* after the change - e.g. today you're in need of an unused primary key and choose one. In 6 months, that key will be used by Liferay, not knowing that you have done so manually. Liferay's API operation will fail then and you will have long forgotten that you have manually inserted some data, causing this issue.

Not to mention that Liferay relies on various foreign key relationships that are not obvious and that you will miss. Even documenting them will not help you, because the requirements for those foreign keys will change over time without notice. All update routines assume that certain data is there - if you missed it manually, updates might fail in any way. The API does it right. Use that!
Guru patil, modificado hace 10 años.

RE: Information on Liferay and Liferay DB

Regular Member Mensajes: 163 Fecha de incorporación: 19/04/13 Mensajes recientes
Thanks every body for fruitful information,

I will use the liferay API for the reference.

But David referred to stay out of database its bit confusing.
As database as database is the main thing involved in any application and its like heart of any application.
So database need to be understood if we want some in-depth information.
thumbnail
David H Nebinger, modificado hace 10 años.

RE: Information on Liferay and Liferay DB

Liferay Legend Mensajes: 14914 Fecha de incorporación: 2/09/06 Mensajes recientes
Guru patil:
As database is the main thing involved in any application and its like heart of any application. So database need to be understood if we want some in-depth information.


In Liferay, the API is the heart of the application. The API needs to be understood if you want some in-depth information.

The database itself can be rather confusing. It is highly normalized, and many key columns can be keys to many different tables; they're not foreign keys as defined by the relational model. It's also undocumented, and changes with every new release.

And for Liferay, the database is only 'part' of the heart. There's caching, there's indexing, there's filesystem stores, etc. The database, in itself, does not provide a complete picture that you may get from other applications.

The API is the only thing that will give you the complete picture...
thumbnail
Jack Bakker, modificado hace 10 años.

RE: Information on Liferay and Liferay DB

Liferay Master Mensajes: 978 Fecha de incorporación: 3/01/10 Mensajes recientes
learning about the database and api is very educational ; however like with most more sophisticated software, best not to change data in the db directly given dependencies (I think that is what David meant)
Guru patil, modificado hace 10 años.

RE: Information on Liferay and Liferay DB

Regular Member Mensajes: 163 Fecha de incorporación: 19/04/13 Mensajes recientes
Now i can agree with David.

Thanks David and Jack for clarifying the things.emoticon