By this time, we have Sitecore website running in our machine, and also ready with Visual Studio solution setup. From now, we will look into Sitecore concepts, in both theory and hands on as well.
As we all know Sitecore is a database driven CMS, in this post let’s look into Sitecore databases.

Sitecore Databases:

From developer’s perspective, until and unless any customization is required, we don’t directly deal with databases, we always access data using Sitecore Api’s. but it is very important to know about, what are all databases Sitecore uses.

Sitecore uses multiple databases to manage both content and also analytics related data.

sitecore-databases

Content Databases

Sitecore uses three databases to maintain content. It always supports MS SQL server, but in Sitecore latest version 8.2 also supports Oracle 12g. But Oracle is only supported in CMS only mode, not for xDB.

oracle

Sitecore CMS uses the following three databases,

  • Core: This database contains all settings related to Sitecore, ex: Sitecore User Interface (Content Editor, Experience Editor, etc.) configuration. Using this database, we can add any new application, or shortcut on Sitecore launch pad or desktop.
    This database also contains information about authentication and authorization, (Users & roles)
  • Master: This is content authoring database. All content authors mainly interact with this database, using either Content Editor or Experience Editor. It contains all versions of any content or assets.
  • Web: This is also called live database. It contains all the live content, which is serving on the production website. When content author modifies any content, and publish it, content copied over to web database. Master database contains all versions of content, whereas web database only contains live version of content. Web database is subset of the Master database.

When we log into Sitecore, by default it always displays content from Master database, but we can select the database to show the content from other databases, like as shown below,

database-selection

Collection Database (Mongo DB):

As stated in Sitecore documentation, “In the Siteecore Experience Database (xDB), the Collection database is the central repository for storing contact, interaction, history & automation data.”
It uses MongoDB – a highly scalable document-based NoSQL database solution.
Prior to Sitecore Version 7.5, all of analytics data used to get stored in Analytics database which was part of MS SQL server.

  • tracking.live:
    The tracking.live database is used by two entities:

    1. Task Storage (defined in Sitecore.Analytics.Processing.config file)
    2. Live Processing Pool (defined in Sitecore.Analytics.Processing.Aggregation.ProcessingPools.config file)
      read more information on Sitecore stackexchange
  • tracking.history:
    The tracking.history database is used by only one entity:
    History Processing Pool (defined in the Sitecore.Analytics.Processing.Aggregation.ProcessingPools.config file).
    read more information on Sitecore stackexchange
  • tracking.contact:
    The tracking.contact database is used by only one entity:
    Contact Processing Pool (defined in the Sitecore.Analytics.Processing.Aggregation.ProcessingPools.config file).
    read more information on Sitecore stackexchange
Reporting Database:

The reporting database is a SQL Server database that stores aggregated data from the collection database suitable for fast querying and reporting. This database contains aggregated data from collection DB.

Happy Learning 🙂