0
votes

Not sure if this is stackoverflow typically question (I'll remove it if suggested), still may help me understand the possible options here.

I would like to know if it's somehow possible beside core, master and web instances to append new content database (let say for some form's filled with data by web users with CRUD repository using existing sitecore api). Editable/readonly from CMS, visible for exports, reports or charts via CMS using custom modules.

Somehow this DB should be located on the same level with Web Database, it's important to follow templates and functionality from sitecore legacy functionality.

This entire shebang will be used in as Sitecore Custom Module (installation, integration customization, management, blah, blah blah). Important: Items stored in this database are pure data items.

I found vague information on John west Sitecore blog, so what I asking more then the direct solution in front of my eyes references or examples how to, or signals if it's against the policy.

Best reference until now: http://intothecore.cassidy.dk/2009/05/working-with-multiple-content-databases.html article written by Mark Cassidy.

2
Yes, it possible, I did something similar with redirects: jammykam.wordpress.com/2015/01/19/… You'll have to always use Factory.GetDatabase("otherDB") to access your items and work against the API. But you may want to follow Maras recommendation of using a DataProvider, depends on your exact requirements. - jammykam
Thanks guys, DataProvider seems to be a nice approach at my problem, I'm adapting on the fly the implementation I'll come back with small architecture. Data Provider from web to master is so far the key to me but I'm not giving up on auxiliary web database. - SilentTremor

2 Answers

0
votes

The reason you don't find much information on this is because its very uncommon to add another database which is accessible to Sitecore as per the john west blog. Note the data of that post also. I'm not aware of your requirements but I have never seen it done or found a need for it.

With user input data such as forms, comments etc. You have three data considerations storage, access and reporting. In a scenario where you would like to store this data and access it in Sitecore. I would approach it as follows:

Storage of that data should be in the master database inside a bucket. From version 7.0+ buckets were introduced so you can add virtually unlimited data to a Sitecore database. There was a buckets module which supported 6.3+ but appears to not be downloadable anymore: https://marketplace.sitecore.net/en/modules/sitecore_item_buckets.aspx. The code is out there though and possibly Sitecore support would even provide it.

The master database in a standard production environment (split content management and content delivery environments) if not accessible directly via connection string is made accessible by calling the Sitecore web API or creating a custom web service.

Requirements such as reporting and/or shared access to the data for other applications could possibly provide reasons to create a custom database but otherwise there is no reason not to store it in the master database.

0
votes

You have to save the information filled by the user in Master database so that you can modify or use it using SItecore API.

Since the users filling the form may not have access to modify Sitecore Master DB. You would have to either switch the user to a user with least permissions required to make those changes(safer) or You would have to disable the security for a while and perform those tasks(not recommended). Both of these are explained in http://www.nehemiahj.com/2012/03/how-to-use-securitydisabler-and_15.html

And then add the form as an item in master db. If the number of form items created using this is more then use Sitecore Buckets.