Vista combinada Visión Plana Vista de árbol
Discusiones [ Anterior | Siguiente ]
toggle
Georgian ABRAHAM
Information on Liferay and Liferay DB
19 de junio de 2013 4:07
Respuesta

Georgian ABRAHAM

Ranking: Regular Member

Mensajes: 161

Fecha de incorporación: 19 de abril de 2013

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
David H Nebinger
RE: Information on Liferay and Liferay DB
19 de junio de 2013 4:56
Respuesta

David H Nebinger

Community Moderator

Ranking: Liferay Legend

Mensajes: 11305

Fecha de incorporación: 1 de septiembre de 2006

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.
dave ch
RE: Information on Liferay and Liferay DB
19 de junio de 2013 7:26
Respuesta

dave ch

Ranking: Regular Member

Mensajes: 164

Fecha de incorporación: 6 de febrero de 2012

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
Mika Koivisto
RE: Information on Liferay and Liferay DB
19 de junio de 2013 17:31
Respuesta

Mika Koivisto

LIFERAY STAFF

Ranking: Liferay Legend

Mensajes: 1513

Fecha de incorporación: 7 de agosto de 2006

Mensajes recientes

Don't mess with the database. Use the API.
Georgian ABRAHAM
RE: Information on Liferay and Liferay DB
19 de junio de 2013 22:36
Respuesta

Georgian ABRAHAM

Ranking: Regular Member

Mensajes: 161

Fecha de incorporación: 19 de abril de 2013

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.
Manish Yadav
RE: Information on Liferay and Liferay DB
19 de junio de 2013 23:26
Respuesta

Manish Yadav

Ranking: Expert

Mensajes: 463

Fecha de incorporación: 26 de mayo de 2012

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
Girish kumar
RE: Information on Liferay and Liferay DB
20 de junio de 2013 2:40
Respuesta

Girish kumar

Ranking: Junior Member

Mensajes: 27

Fecha de incorporación: 16 de junio de 2013

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.
David H Nebinger
RE: Information on Liferay and Liferay DB
20 de junio de 2013 6:52
Respuesta

David H Nebinger

Community Moderator

Ranking: Liferay Legend

Mensajes: 11305

Fecha de incorporación: 1 de septiembre de 2006

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.
James Falkner
RE: Information on Liferay and Liferay DB
20 de junio de 2013 12:09
Respuesta

James Falkner

Community Moderator

Ranking: Liferay Legend

Mensajes: 1406

Fecha de incorporación: 17 de septiembre de 2010

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.
Olaf Kock
RE: Information on Liferay and Liferay DB
21 de junio de 2013 3:31
Respuesta

Olaf Kock

LIFERAY STAFF

Ranking: Liferay Legend

Mensajes: 3470

Fecha de incorporación: 23 de septiembre de 2008

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!
Georgian ABRAHAM
RE: Information on Liferay and Liferay DB
23 de junio de 2013 12:50
Respuesta

Georgian ABRAHAM

Ranking: Regular Member

Mensajes: 161

Fecha de incorporación: 19 de abril de 2013

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.
David H Nebinger
RE: Information on Liferay and Liferay DB
24 de junio de 2013 5:04
Respuesta

David H Nebinger

Community Moderator

Ranking: Liferay Legend

Mensajes: 11305

Fecha de incorporación: 1 de septiembre de 2006

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...
Jack Bakker
RE: Information on Liferay and Liferay DB
24 de junio de 2013 6:48
Respuesta

Jack Bakker

Ranking: Liferay Master

Mensajes: 840

Fecha de incorporación: 3 de enero de 2010

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)
Georgian ABRAHAM
RE: Information on Liferay and Liferay DB
25 de junio de 2013 11:34
Respuesta

Georgian ABRAHAM

Ranking: Regular Member

Mensajes: 161

Fecha de incorporación: 19 de abril de 2013

Mensajes recientes

Now i can agree with David.

Thanks David and Jack for clarifying the things.emoticon