Table of Contents Hide
Sitecore comes up with 3 Databases(Core, Master, and Web) by default when we perform a fresh installation. So what is the Difference between Core, Master and Web Databases in Sitecore?
Difference between Core, Master and Web Databases in Sitecore
As the name indicates Core Database is the backbone of the Sitecore application and it is used for multiple purposes.
- Core database contains all Sitecore settings.
- It contains the definition of Desktop Mode, Content Editor, Page Editor etc.
- The core database contains data needed by the Content Manager.
- All the menu items in the Ribbon is stored in the Core Database. In case if you need to create a new menu item in the ribbon you need to add the context and definition in the Core Database.
- It Contains the membership related tables which drive Sitecore Authentication, Authorization, and Security.
Master Database in Sitecore is also called as Content Authoring Database. Whenever you create a new piece of content it will be stored in the Master Database.
- Master Database is used for Content Authoring.
- Master Database maintains the versioning of the contents.
- The Default Database loaded by the Content Editor is Master for content authoring purpose.
- You can Add, Edit or Delete new items in the Master Database and it is used for development of new pages and components.
Accessing the Master Database from Code
Sitecore.Data.Database master = Sitecore.Configuration.Factory.GetDatabase("master");
The Web Database contains the live content of the website and it is also called as a published Database.
- Web Database is a subset of the Master Database.
- Whenever the content is published from Master Database it goes through the publishing task and the Workflow and the latest version of the content is copied from Master Database to Web Database.
- Web Database is Optimized for Speed, Size, and Performance.
- You could rename web database in case if you need.
- Often the Enterprise application will have multiple Databases. You could configure as many databases for SIT, UAT and Live according to your need and name it accordingly.