Comments interleaved below:
Nandana Mihindukulasooriya wrote:
On 3/23/07, Brian Thompson <[EMAIL PROTECTED]> wrote:
Yes, this a very simplified version how I keep the blog related to the
mblog
application which I'm currently involved. There I use a RDBMS, so it was
designed with those guidelines in mind. What are the things one should
consider if migrating from RDBMS to JCR. What are the common pitfalls ? So
if I put it to in to a hierarchy like this
- Users
- BlogEntry
- Comment
- Rate
- Image Attachment
or
- Users
- Year
- Month
- Date
- Blog Entry
- Comment
- Rate
- Image Attachment
Would this be a a good hierarchy ? What do I think when choosing a
hierarchy
Both of these hierarchies would work reasonably well. Personally, I'd
lean towards a slight modification on the second option as a way of
organizing data instead of having (eventually) thousands of BlogEntry
nodes as immediate children of the User.
I would put Year under User instead of alongside it, though:
- Users
- Year
- Month
...
? Choosing the correct hierarchy must make it easy to search and navigate
and it would also increase the performance , isn't it ?
What are the other possible options I have ?
Under the first hierarchy referential integrity is automatically preserved,
isn't it ? How do I preserve the integrity if I go to the second option ?
Both hierarchies (if you use my modification) preserve referential
integrity; in my proposed model, you simply have to call
Node.getParent() a couple of extra times. With Years as siblings of
Users instead of children of users, you'd have to include a reference to
the User in the BlogEntry node. Taking a look at the Node Types/Node
Type Notation pages
(http://jackrabbit.apache.org/doc/nodetype/index.html and
http://jackrabbit.apache.org/doc/nodetype/cnd.html) should give you some
ideas.
One other thing to look at is the mix:referenceable mixin type that
Jackrabbit offers. Reading up on it should give you some ideas on how
to retrieve arbitrary blog entries.
Oh, one other thing: In your model, do you ever expect the same image
to be attached to multiple BlogEntries?
-Brian
Yes, I would like to change the scope of the project ( of course ,
it is
the mentor I think who can take and guide me to the those decisions )
according to the discussions in the mailing list. As I am new to jackrabbit
I will depend a lot on the jackrabbit community and I planning to do the
project with the help of jackrabbit community. Anyway I am ready put a
considerable time to for the GSoc project and I will always keep a healthy
communication with the community.
Thank you very much, I really appreciate your advices and the guidance.
BR,
Nandana