To Expand an existing DB, or to link to it through IDs - that is the question.

Permalink
An architectural question: To build a concept I initially added about 70 attributes to the File Manager. This enabled me to act upon an uploaded file by the customer and to provide them a necessary and valuable response.

Now, backtracking, I need to streamline the process of adding this feature to (potentially) new installations of C5/Document_Library/eCommerce. These custom attributes need to be associated with a particular file - similar to how the user object is related to files. I am struggling with how best to implement this association.

If I manipulate the document_library xml db then it means that ALL files uploaded (even system files and images) will have these attributes, which is adding bulk for no value. That is essentially the condition it's in now as adding them as attributes within the file manager applies them to all files through their attribute key IDs.

If I create these 70 attributes in their own (xml) table then I could assign them to the files that are uploaded by customers - but that poses another question: These attributes (keys) require their values to be changed per the file they are associated with. That whole process of updating the key->values per a particular file is already handled through the Document_Library addon. It seems like a lot of difficult work to essentially redo this management only in order to keep the newly added attributes from populating throughout all files.

Do you think it's better to simply extend the Document_Library addon's xml schema and work with the existing structure, helping to speed the installation of the attributes - at the expense of some system performance and hacking of the core Document Library addon?

Or is the process of associating the new attribute keys and managing their values from a separate db within it's own block less difficult than I am imagining?

I am aware this could lead to a much longer answer than anyone's time would permit. What I would really appreciate is a point in the right direction while I am at this fork in the road. I am leaning towards hacking the Document_Library and simply making that addon do what I want it to do (extend the xml db.)

Thanks for any advice or concept in approaching this issue.

Rick

Ricalsin