Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Georgian ABRAHAM
Information on Liferay and Liferay DB
June 19, 2013 4:07 AM
Answer

Georgian ABRAHAM

Rank: Junior Member

Posts: 71

Join Date: April 19, 2013

Recent Posts

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
June 19, 2013 4:56 AM
Answer

David H Nebinger

Rank: Liferay Legend

Posts: 7080

Join Date: September 1, 2006

Recent Posts

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
June 19, 2013 7:26 AM
Answer

dave ch

Rank: Regular Member

Posts: 164

Join Date: February 6, 2012

Recent Posts

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
June 19, 2013 5:31 PM
Answer

Mika Koivisto

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1498

Join Date: August 7, 2006

Recent Posts

Don't mess with the database. Use the API.
Georgian ABRAHAM
RE: Information on Liferay and Liferay DB
June 19, 2013 10:36 PM
Answer

Georgian ABRAHAM

Rank: Junior Member

Posts: 71

Join Date: April 19, 2013

Recent Posts

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
June 19, 2013 11:26 PM
Answer

Manish Yadav

Rank: Expert

Posts: 384

Join Date: May 26, 2012

Recent Posts

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
June 20, 2013 2:40 AM
Answer

Girish kumar

Rank: Junior Member

Posts: 27

Join Date: June 16, 2013

Recent Posts

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
June 20, 2013 6:52 AM
Answer

David H Nebinger

Rank: Liferay Legend

Posts: 7080

Join Date: September 1, 2006

Recent Posts

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
June 20, 2013 12:09 PM
Answer

James Falkner

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1216

Join Date: September 17, 2010

Recent Posts

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
June 21, 2013 3:31 AM
Answer

Olaf Kock

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1856

Join Date: September 23, 2008

Recent Posts

...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
June 23, 2013 12:50 PM
Answer

Georgian ABRAHAM

Rank: Junior Member

Posts: 71

Join Date: April 19, 2013

Recent Posts

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
June 24, 2013 5:04 AM
Answer

David H Nebinger

Rank: Liferay Legend

Posts: 7080

Join Date: September 1, 2006

Recent Posts

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
June 24, 2013 6:48 AM
Answer

Jack Bakker

Rank: Liferay Master

Posts: 606

Join Date: January 3, 2010

Recent Posts

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
June 25, 2013 11:34 AM
Answer

Georgian ABRAHAM

Rank: Junior Member

Posts: 71

Join Date: April 19, 2013

Recent Posts

Now i can agree with David.

Thanks David and Jack for clarifying the things.emoticon