AnsweredAssumed Answered

modelling question (from RDBMS perspective)

Question asked by darionis on Dec 11, 2013
Latest reply on Dec 12, 2013 by afaust
I was thinking about application design in alfresco. I come with RDBMS background and relational type of thinking is somehow stuck in my mind. Obviously, alfresco requires different approach so I would like to ask few questions an discuss possible answers.

First of all I am not sure how to work with relations, most basic ones (many-to-one). Let's say I have to store "document" but I need to know it's "kind". "Kind" also has some attributes that are relevant to the document. In RDBMS app that would be implemented with foreign key (and a join), so I would be able to search for documents by property of it's kind. So, my first attempt in Alfresco, is to model two distinct types and make association but that makes searching difficult or impossible: a single lucene query that would find all documents that are contracts which are 'above 100K$' ('above 100$K' is attribute of contract kind). Other option is to store it as a flat data (like 1st normal form in RDBMS) but it also has maintenance  drawbacks.

I know that CMIS provides for SQL-like queries but I find it awkward, particularly when it comes to aspects. I also appears to me that CMIS queries are slow.

Is there a third or fourth option? Basically my problem is that I'am not aware of trade-offs between approaches, what I get and what I loose in terms of ease-of-development and also more important, performance.

Another problem I face is when I retrieve a document, I need to load all it's associations ("kind", etc) one-by-one and it may be cumbersome.

Has anybody got a suggestion or what would be a alfresco way of dealing with this?


Thanks!

Outcomes