jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexander Klimetschek" <aklim...@day.com>
Subject Re: JackRabbit or Hibernate
Date Mon, 03 Nov 2008 12:31:45 GMT
On Mon, Nov 3, 2008 at 1:05 PM, Tobias Marx <tmarx78@gmx.de> wrote:
> so were do you draw the line? When are databases useful and when JackRabbit?

Databases are useful when the schema won't change during development
and lifetime of the software involved and if you have things that fit
into a table and where you want pure performance based on
adding/removing thousands of items per second to the same table.

JCR is useful when you need a flexible content model, eg. if you
detect later after release that you need a separate address field for
your users in china that nobody was aware of when you did the design
or implementation - with JCR you can simply add that field in your
source code and you are done. Or if you want to be able to introduce a
new 1:M relationship (a new "folder") later without having to rework
everything. Things that are hierarchical by nature (such as CMS
content) fit the most.

> Examples:
> 1. User data (username/passwords/email)

Depdends: if it is really only a fixed set of data, a db approach
might be simpler (and maybe faster). If you want to store
user-generated content along-side the users, JCR gives you more

> 2. User associations to other Users or Messages

JCR (more flexible).

> 3. "Content data", such as texts written by a user

JCR (that's why it is called Java *Content* Repository)

> 4. Private User data

See 1.

> 5. Public User data

See 1.

> 6. Technical data (e.g. logs, ip addresses, last login timestamps=

Databases probably more performant for that.

Please note that decisions on what to use should also take into acount
all the specific requirements, so my guidance above should not be seen
as fixed answers for the given categories ;-)


Alexander Klimetschek

View raw message