Reputation: 1343
How can we extend the Alfresco database? I need to add new tables to the existing database structure.
Does alfresco support this?
thanks in advance, sri..
Upvotes: 4
Views: 3980
Reputation: 11
Alfresco and Activiti come with a database. It is not good to access the database directly. Doing so can cause unexpected locking behavior or exhaust connection pools on the DB. This turns out into performance problems and other kinds of issues are possible too. In case you want to update Alfresco or Activiti you can do it through APIs. Easy to extend, easy to customize and hassle free integration capability are some of the reasons which has made http://loganwinson.doodlekit.com/blog/entry/4249216/top-things-to-know-about-alfresco-development>Alfresco web development popular among businesses.
Upvotes: 1
Reputation: 4156
Depending on your use case, you may or may not need to play directly with the[/a] data base. I think your use case should fall in one of the following:
Use case 1: You need to setup some metadata on folders and/or documents. You may have to nest multiple levels of nodes with different sets of custom metadata on each level.
Use case 2: You need to define multiple lists with different sets of properties, those lists may or may not be linked to some content in your alfresco repo.
Use case 3: You need to leverage a relational database in order to define and leverage you complex business logic that do not fall in any of the use cases defined above.
Upvotes: 1
Reputation: 3175
Changing alfresco database is not recommended.Content Model will be the good way.If such requirement is mandatory than,
You can use spring with hibernate for database connection.Properties which is required for connecting database are all ready declared inside alfresco-global.properties which is located inside "tomcat/shared/classes/".
For Spring bean injection you can declare beans inside any file which ends with "-context" which resides inside "tomcat/shared/classes/alfresco/extension" folder.
I will still recommend developer to use content model.
Upvotes: 2
Reputation: 71
Advices from alfresco engineers are do not touch alfresco database. Please take a look at this page. http://forums.alfresco.com/forum/general/non-technical-alfresco-discussion/where-alfreso-user-details-are-stored-i-alfresco
Upvotes: 2
Reputation: 811
I think changing the alfresco db model is never a good solution. Some alfresco upgrades are made using Schema Upgrade Scripts, and that could get messy.
Have you tried to extend the alfresco content model? Alfresco support some data types, allowing you to persist data. The Web Script framework allow you manipulate all your data inside your content model.
If your data is not suitable for a "content model", I think you should create a new database to hold your data.
Upvotes: 21
Reputation: 3566
Well, it is just a database. So you can create as many new tables as you want just like you would in any other database. Obviously Alfresco won't use them because it doesn't know them, but you can query the tables as you like.
Upvotes: 4