cancel
Showing results for 
Search instead for 
Did you mean: 

Associations v/s attributes

pvaibhav
Champ in-the-making
Champ in-the-making
I am trying to define my content model in Alfresco.

Here is my problem:
I have n equipments (a domain object) and some content (text/files). Each content item may be associated with 1 or n equipments.

I can think of two ways to do this
1) Store list of n equpiments (it may have it's own metadata) as nodes and then put association with content nodes.

2) Simply put list of equipments as comma seperated list attribute for each content node. We can use Lucene to find what are all the content items related to equipment X?

Which one is better & efficient ? Any suggestions?

Regards,
Vaibhav
1 REPLY 1

davidc
Star Contributor
Star Contributor
If equipment has its own metadata, then I'd use an association (a child association should be fine).

Its easier - you can use the Alfresco APis to manipulate equipment (no need for custom serialisation into a single prop) and you can use the dictionary to provide any additional meta-data for your equipment properties.

You can still search on all these attributes.  In fact, you'll have better control over search if you have a seperate node for equipment with its own set of properties.

I'm not sure there's noticable performance differences with either approach.