Confluence Data Model
This document provides a diagram of the Confluence schema and a conceptual overview of the data model.
Notes:
- The Hibernate mapping files are the authoritative reference for the Confluence data model. These are the
*.hbm.xml
files which you will find in the main Confluence JAR file (<CONFLUENCE-INSTALLATION>\confluence\WEB-INF\lib\confluence-x.x.x.jar
). - The tables, columns and other attributes are likely to change with each major release of Confluence. To find the exact DDL of your Confluence site, please run a query after installation.
On this page:
Database diagrams
We find that creating your own visualization of the Confluence database can be useful if you want to focus on particular tables or relationships. There are a number of tools you can use to create a visualization. Your own database tool may have options to do this.
View our visualization (excludes some tables, including ActiveObjects tables)
We used DbVisualizer. See Viewing Table Relationships in the DbVis documentation to find out how it's done.
Database tables and references
Expand the link below to see a table of the primary and foreign keys for each table.
The following sections describe the principal tables involved in each logical area of Confluence – authentication, content, system information, and so on.
Authentication
This section describes the tables involved in user authentication, which is implemented via the Atlassian Crowd framework embedded in Confluence.
Table | Description |
---|---|
cwd_user | Information for each user in Confluence. |
cwd_group | The groups to which users can belong. |
cwd_membership | Mapping the membership of users to groups. |
| The user directories in your Confluence site. Examples of directories are the Confluence internal directory, or an LDAP directory. |
cwd_application | The applications (Jira, Confluence, and so on) defined in the authentication framework. |
Content
This section describes the tables involved in storing content. Content is the information that Confluence users are storing and sharing.
Table | Description |
---|---|
attachmentdata | The binary data for attached files. Only populated for Confluence sites created prior to Confluence 5.5, where Confluence was configured to store attachments in the database. Otherwise, attachments are stored in the local file system. |
| Only present for Confluence sites created prior to Confluence 5.5, where Confluence was configured to store attachments in the database. |
bodycontent | The content of Confluence pages. No version information or other metadata is stored here. That is all in the content table. |
content | A persistence table for the ContentEntityObject class of objects. The subclass is indicated by the contenttype column. |
content_label | Arbitrary text labels for content. |
label | The other half of the content_label system. |
| Content-level permissions objects. |
content_perm_set | A one-to-many mapping for content items and their permissions, with added metadata. |
pagetemplates | The back end of the templates feature. |
likes | The pages and other content liked by a particular user. |
follow_connections | A mapping of users who are following other users. |
Clustering
The following table contains information about clustered Confluence sites.
Table | Description |
---|---|
| Normally, this table only contains one row. The value of the safetynumber is what Confluence uses to find out whether another Confluence site is sharing its database without being part of the cluster. |
journalentry | The journal service keeps the search index in synch across each Confluence node. |
System information
These tables store data related to the status and configuration of the Confluence site.
Table | Description |
---|---|
| Used by the upgrade system to determine what to expect from the database, so as to negotiate upgrades. |
plugindata | A record of the plugins that have been installed, and when.data is a blob of the actual plugin JAR file. This is principally cluster-related. |
diagnosticalerts | The diagnostics tool continuously checks for symptoms or behaviours that we know may contribute to problems in your site. Events are stored for a limited amount of time in this table. |
Spaces
This table is related to the management of spaces.
Table | Description |
---|---|
| Information about the spaces themselves: key, human-friendly name and numeric ID. |
spacepermissions | Information about permissions and restrictions for spaces. |
Appearance
The following table contains information about the look and feel of your Confluence site.
Table | Description |
---|---|
| The custom display templates used to customize Velocity layouts. |
Synchrony
The following table contains information about Synchrony, which is used for collaborative editing.
Table | Description |
---|---|
| Stores all events that happen in the editor. |
secrets | Used for authenticating Synchrony with Confluence. |
snapshots | A cache of events that happen in the editor. |
Miscellaneous
This section includes other tables worth commenting on.
Table | Description |
---|---|
| Arbitrary association of entities and properties. |
bandana | A catch-all persistence layer. This table contains things like user settings and space- and global-level configuration data, and is used as storage by plugins such as the Dynamic Task List plugin. Essentially, for storing arbitrary data that doesn't fit anywhere else. |
extrnlnks | Referral links. |
hibernate_unique_key | Used by the high/low ID generator – the subsystem which generates our primary keys. If you interfere with this table, you may not be able to create objects in Confluence. |
indexqueueentries | Manages full-content indexing across the system. The table generally contains the last 12 hours (approximately) of updates, to allow re-syncing of cluster nodes after restarts. |
keystore | Used by the trusted apps framework to store the server's private key, and other servers' public keys. |
links | Tracks links within the server (that is, across and within spaces). |
notifications | Stores page- and space-level watches. |
trackbacklinks | Trackback links. |
confancestors | Used to speed up permissions checks, by allowing quick lookup of all a page's ancestors. |