组合视图 统一视图 树状图
讨论主题 [ 上一个 | 下一个 ]
toggle
Georgian ABRAHAM
Information on Liferay and Liferay DB
2013年6月19日 上午4:07
答复

Georgian ABRAHAM

等级: Regular Member

帖子: 161

加入日期: 2013年4月19日

最近的帖子

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
2013年6月19日 上午4:56
答复

David H Nebinger

Community Moderator

等级: Liferay Legend

帖子: 11087

加入日期: 2006年9月1日

最近的帖子

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
2013年6月19日 上午7:26
答复

dave ch

等级: Regular Member

帖子: 164

加入日期: 2012年2月6日

最近的帖子

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
2013年6月19日 下午5:31
答复

Mika Koivisto

LIFERAY STAFF

等级: Liferay Legend

帖子: 1513

加入日期: 2006年8月7日

最近的帖子

Don't mess with the database. Use the API.
Georgian ABRAHAM
RE: Information on Liferay and Liferay DB
2013年6月19日 下午10:36
答复

Georgian ABRAHAM

等级: Regular Member

帖子: 161

加入日期: 2013年4月19日

最近的帖子

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
2013年6月19日 下午11:26
答复

Manish Yadav

等级: Expert

帖子: 449

加入日期: 2012年5月26日

最近的帖子

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
2013年6月20日 上午2:40
答复

Girish kumar

等级: Junior Member

帖子: 27

加入日期: 2013年6月16日

最近的帖子

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
2013年6月20日 上午6:52
答复

David H Nebinger

Community Moderator

等级: Liferay Legend

帖子: 11087

加入日期: 2006年9月1日

最近的帖子

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
2013年6月20日 下午12:09
答复

James Falkner

Community Moderator

等级: Liferay Legend

帖子: 1406

加入日期: 2010年9月17日

最近的帖子

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
2013年6月21日 上午3:31
答复

Olaf Kock

LIFERAY STAFF

等级: Liferay Legend

帖子: 3430

加入日期: 2008年9月23日

最近的帖子

...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
2013年6月23日 下午12:50
答复

Georgian ABRAHAM

等级: Regular Member

帖子: 161

加入日期: 2013年4月19日

最近的帖子

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
2013年6月24日 上午5:04
答复

David H Nebinger

Community Moderator

等级: Liferay Legend

帖子: 11087

加入日期: 2006年9月1日

最近的帖子

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
2013年6月24日 上午6:48
答复

Jack Bakker

等级: Liferay Master

帖子: 840

加入日期: 2010年1月3日

最近的帖子

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
2013年6月25日 上午11:34
答复

Georgian ABRAHAM

等级: Regular Member

帖子: 161

加入日期: 2013年4月19日

最近的帖子

Now i can agree with David.

Thanks David and Jack for clarifying the things.emoticon