jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Campbell" <rrc...@gmail.com>
Subject Node relationships?
Date Sun, 09 Nov 2008 13:30:02 GMT
I'm almost done ready the JCR spec, but I don't see any mention of
this particular problem:

A product node can be the child of multiple category nodes (for
example). In a RDBMS you can express relationships between entities
however you wish, in this case I would have a cross-reference table
with product_id and category_id, resulting in products being mapped to
as many categories as you want. The JCR, however, lays out a pretty
strict tree hierarchy preventing multiple parents.

One thought is that I keep the RDBMS for relationship data, and just
have a column in the products table for UUID pointing to the JCR
(which would probably just be flat, each node having a UUID, and not
utilizing the tree structure). This means the DB would have
relationship data, and the JCR would have entity data.

The other thought is scrap the DB and just have a multivalue Category
property on all Product nodes containing the UUID of the Category they
reside in. This feels a bit like a hack, however, and while removing
the need for the DB to store relationships, it still doesn't make use
of the tree structure.

I can't be the first one to encounter this problem, but I can't find
any design patterns to address it.

Rob

Mime
View raw message