Adobe Experience Manager (AEM), a leading digital experience management solution, utilizes certain types of databases to manage and store content. This guide will delve into which databases AEM uses, their roles, and how they contribute to the overall functionality of AEM.
Key Takeaways
- AEM primarily uses Apache Jackrabbit Oak as its content repository, which is not a traditional database.
- Jackrabbit Oak supports different backends for persistence: TarMK (Tar Machine Kernel) and MongoDB.
- TarMK is the default and recommended storage option for most AEM use cases.
- MongoDB is used for projects needing horizontal scalability.
Introduction to AEM and Databases
AEM is built on the Java Content Repository (JCR), which is a type of Object Database. Rather than using a traditional relational database, AEM uses Apache Jackrabbit Oak as its content repository. Apache Jackrabbit Oak itself supports multiple types of storage for persistence, which we will delve into in the following sections.
Apache Jackrabbit Oak
Apache Jackrabbit Oak is a scalable, high-performance hierarchical content repository designed for use as the foundation of modern world-class web sites and other demanding content applications. It is the implementation of the JCR standard used by AEM for content storage and management.
TarMK (Tar Machine Kernel)
TarMK is the default storage option in AEM and is recommended for most instances. It is a file-based storage system where all content is stored in the form of tar files. TarMK is particularly efficient for read-heavy and write-light operations, which are common in many AEM deployments.
Benefits of TarMK
- Performance: TarMK is optimized for read operations, providing fast access to content.
- Backup and Restore: TarMK allows for easy backup and restore operations.
- Maintenance: Less maintenance is required compared to MongoDB.
MongoDB
While TarMK is the default, AEM also supports MongoDB as a storage option, particularly for projects requiring horizontal scalability. MongoDB is a NoSQL database that can be used when there is a need to distribute the repository among several servers.
When to Use MongoDB
- Horizontal scaling: If there’s a need to add more servers to handle increased load.
- Write-heavy operations: MongoDB can be more efficient for write-heavy operations.
- Large number of concurrent users: MongoDB can manage a large number of users concurrently.
Choosing Between TarMK and MongoDB
Choosing between TarMK and MongoDB depends on the specific needs of the project. For most use cases, TarMK is sufficient and preferred due to its efficiency and lower maintenance. However, for larger, more complex projects requiring horizontal scalability, MongoDB might be the better choice.
Conclusion
While AEM does not use a traditional relational database, it utilizes Apache Jackrabbit Oak as its content repository, which supports two main types of storage: TarMK and MongoDB. Understanding the differences between these storage options and when to use each can greatly enhance the efficiency and performance of your AEM deployment.
![Kirll Efimov](https://aem-development.com/wp-content/uploads/kirill_efimov.jpg)
I’m Kirill Efimov, an experienced AEM developer with over 10 years of experience in Java and web development. I’m skilled in developing AEM components, templates, workflows, and integrations with other systems, and I’m passionate about delivering high-quality solutions to my clients.
I also believe in knowledge-sharing and staying up-to-date with the latest developments in the industry. Through blog posts, tutorials, and speaking engagements, I’m committed to contributing to the AEM community and helping others overcome the challenges they may face in their AEM projects.