Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Thomas Kellerer
Data model documentation?
June 24, 2008 2:09 AM
Answer

Thomas Kellerer

Rank: Expert

Posts: 350

Join Date: June 9, 2008

Recent Posts

Hello,

is there a documentation available for the data model?

As it neither uses foreign key constraints nor check constraints to enforce data integrity it is very hard to read or understand.
And the database object have not been created with comments either emoticon

Are there plans to add comments to the tables & columns when creating the database.

I'm currently looking at the automatically created HSQLDB, so if these things are used when using a different DBMS, I'm happy to use that. We will have to use Microsoft SQL Server for the final implementation.

Thanks in advance
Thomas
Thomas Kellerer
RE: Data model documentation?
September 2, 2008 5:58 AM
Answer

Thomas Kellerer

Rank: Expert

Posts: 350

Join Date: June 9, 2008

Recent Posts

Obviously there is no documentation on the datamodel, so here are some questions I have:

  • What does it mean when a table name ends with an underscore. Some tables have an underscore some don't
  • What is the difference between the Account_ table and the Company Table (or: why has this information been split into two tables)
  • What is the difference between the userName column and the userId column in the table "Contact_" It seems that userName is a copy of the user's name that created the contact (user??) at the time the contact was created.
  • As it seems that clicking around with the privileges and user right, go my Liferay database corrupted are there any scripts available that analyze or even repair a corrupted database? (why aren't there any foreign key or even check constraints in the database?)
Mauro Mariuzzo
RE: Data model documentation?
September 2, 2008 9:29 AM
Answer

Mauro Mariuzzo

Rank: Regular Member

Posts: 133

Join Date: July 23, 2007

Recent Posts

Thomas Kellerer:
Obviously there is no documentation on the datamodel, so here are some questions I have:

  • What does it mean when a table name ends with an underscore. Some tables have an underscore some don't


I think because this name is a DB reserved keyword.

Thomas Kellerer:

  • What is the difference between the Account_ table and the Company Table (or: why has this information been split into two tables)
  • What is the difference between the userName column and the userId column in the table "Contact_" It seems that userName is a copy of the user's name that created the contact (user??) at the time the contact was created.


I don't know, maybe userName is present for historical reasons emoticon

Thomas Kellerer:

  • As it seems that clicking around with the privileges and user right, go my Liferay database corrupted are there any scripts available that analyze or even repair a corrupted database?


It's strange. I've never experienced that

Thomas Kellerer:

(why aren't there any foreign key or even check constraints in the database?)


I don't know, Maybe to reduce database vendors dependency.
Frank Tao
RE: Data model documentation?
June 20, 2010 9:44 PM
Answer

Frank Tao

Rank: New Member

Posts: 1

Join Date: January 30, 2010

Recent Posts

Mauro Mariuzzo:

Thomas Kellerer:

(why aren't there any foreign key or even check constraints in the database?)


I don't know, Maybe to reduce database vendors dependency.


Using hibernate can achieve the above goals.

I think the current hibernate mapping file should be changed to define the relationship between the objects.

And instead of using sql script to create/update/seed the database, let hibernate do the work.
Robert Folkerts
RE: Data model documentation?
March 3, 2011 10:42 AM
Answer

Robert Folkerts

Rank: New Member

Posts: 5

Join Date: February 21, 2011

Recent Posts

I love how Grails uses Hibernate to add foreign keys to the application databases. I can look at the databases and immediately see the relationships between the data. If Liferay can let Hibernate do the work, can Hibernate add the foreign keys that 1) make ERD tools useful and 2) declaratively enforce referential constraints?
Hitoshi Ozawa
RE: Data model documentation?
March 3, 2011 2:33 PM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 4773

Join Date: March 23, 2010

Recent Posts

As it neither uses foreign key constraints nor check constraints to enforce data integrity it is very hard to read or understand


This style is often used in DI to separate data and dependencies to increase model flexibility.
Model information can be found by looking in the model folder of \portal-service\src\com\liferay

For example, user information is in the \portal-service\src\com\liferay\portal\model\User.java

It's possible to override the model and change the relationships between the model elements.