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.

Click here to show/hide the table...

Note that Marketplace apps can also add tables to your database.

Primary Key Table NamePrimary Key Column NameForeign Key Table NameForeign Key Column NameForeign Key NamePrimary Key Name
AUDITRECORDAUDITRECORDIDAUDIT_AFFECTED_OBJECTAUDITRECORDIDFK_AFFECTED_OBJECT_RECORDPRIMARY_KEY_D
AUDITRECORDAUDITRECORDIDAUDIT_CHANGED_VALUEAUDITRECORDIDFK_CHANGED_VALUE_RECORDPRIMARY_KEY_D
CONTENTCONTENTIDATTACHMENTDATAATTACHMENTIDFKJNH4YVWEN0176QSVH4RPSRY2JPRIMARY_KEY_6
CONTENTCONTENTIDBODYCONTENTCONTENTIDFKMBYIAYESFP1EIQ6GMOL3MK3YLPRIMARY_KEY_6
CONTENTCONTENTIDCONFANCESTORSDESCENDENTIDFKLMHSIPSWOL8IMEQSG906IH62XPRIMARY_KEY_6
CONTENTCONTENTIDCONFANCESTORSANCESTORIDFKSQB1AF9H7FVQTGY73O8JDCUUEPRIMARY_KEY_6
CONTENTCONTENTIDCONTENTPARENTCOMMENTIDFKAL6O8XWYPD4MDGID9B9NW1Q51PRIMARY_KEY_6
CONTENTCONTENTIDCONTENTPARENTCCIDFKFIYHKA48C7E776QJ90KLBPM9QPRIMARY_KEY_6
CONTENTCONTENTIDCONTENTPREVVERFKK6KBB7SUQELOJ82NX7XDCD803PRIMARY_KEY_6
CONTENTCONTENTIDCONTENTPARENTIDFKOXTT893WEUJKYH0IICOXSM37VPRIMARY_KEY_6
CONTENTCONTENTIDCONTENTPAGEIDFKWJYN6091Q3L1GL7BH143MA2APRIMARY_KEY_6
CONTENTCONTENTIDCONTENT_LABELCONTENTIDFKI8CVAHSU6D2Y285VTRP4NHC3WPRIMARY_KEY_6
CONTENTCONTENTIDCONTENT_PERM_SETCONTENT_IDFK2BUUNK1HOR0I3K0M3NT03HW1WPRIMARY_KEY_6
CONTENTCONTENTIDCONTENT_RELATIONSOURCECONTENTIDFKE2A00URQYXMYAJ3JOP48UB8QDPRIMARY_KEY_6
CONTENTCONTENTIDCONTENT_RELATIONTARGETCONTENTIDFKIPR00838MKLN699CIMD7RG17XPRIMARY_KEY_6
CONTENTCONTENTIDCONTENTPROPERTIESCONTENTIDFK3FLY21XFK13RQH63TXW2T6K2VPRIMARY_KEY_6
CONTENTCONTENTIDEXTRNLNKSCONTENTIDFK5V5LW9X88VM27RVUBSC130NJYPRIMARY_KEY_6
CONTENTCONTENTIDIMAGEDETAILSATTACHMENTIDFK2301QICIUQ6SC32JAJ8TYSG3SPRIMARY_KEY_6
CONTENTCONTENTIDLIKESCONTENTIDFKBDOIWI70I7O3TC7HPBU4VNLMYPRIMARY_KEY_6
CONTENTCONTENTIDLINKSCONTENTIDFKN8MYCKO8FRERNE7BRH5NR1CSRPRIMARY_KEY_6
CONTENTCONTENTIDNOTIFICATIONSCONTENTIDFK_NOTIFICATIONS_CONTENTPRIMARY_KEY_6
CONTENTCONTENTIDSPACESSPACEDESCIDFK7NDEWMRL3HQCPWC8EYDN9MV8JPRIMARY_KEY_6
CONTENTCONTENTIDSPACESHOMEPAGEFKJ4CU5838AQCBW57WY7CKT0T7OPRIMARY_KEY_6
CONTENTCONTENTIDTRACKBACKLINKSCONTENTIDFK1TO6OMJL8NHEVCJBVPT3ED7NTPRIMARY_KEY_6
CONTENTCONTENTIDUSERCONTENT_RELATIONTARGETCONTENTIDFKPWGL85A266IIE5I0ADU8BDBCVPRIMARY_KEY_6
CONTENT_PERM_SETIDCONTENT_PERMCPS_IDFKDE5WL1CUR1SE9281GC0DSAWTBPRIMARY_KEY_BF
CWD_APP_DIR_MAPPINGIDCWD_APP_DIR_GROUP_MAPPINGAPP_DIR_MAPPING_IDFK_APP_DIR_GROUP_MAPPINGPRIMARY_KEY_2A
CWD_APP_DIR_MAPPINGIDCWD_APP_DIR_OPERATIONAPP_DIR_MAPPING_IDFK_APP_DIR_MAPPINGPRIMARY_KEY_2A
CWD_APPLICATIONIDCWD_APP_DIR_GROUP_MAPPINGAPPLICATION_IDFK_APP_DIR_GROUP_APPPRIMARY_KEY_5
CWD_APPLICATIONIDCWD_APP_DIR_MAPPINGAPPLICATION_IDFKSTEKJ41875RGSW8OTFFRAYHPLPRIMARY_KEY_5
CWD_APPLICATIONIDCWD_APPLICATION_ADDRESSAPPLICATION_IDFK_APPLICATION_ADDRESSPRIMARY_KEY_5
CWD_APPLICATIONIDCWD_APPLICATION_ATTRIBUTEAPPLICATION_IDFK_APPLICATION_ATTRIBUTEPRIMARY_KEY_5
CWD_DIRECTORYIDCWD_APP_DIR_GROUP_MAPPINGDIRECTORY_IDFK_APP_DIR_GROUP_DIRPRIMARY_KEY_AA
CWD_DIRECTORYIDCWD_APP_DIR_MAPPINGDIRECTORY_IDFK_APP_DIR_DIRPRIMARY_KEY_AA
CWD_DIRECTORYIDCWD_DIRECTORY_ATTRIBUTEDIRECTORY_IDFK_DIRECTORY_ATTRIBUTEPRIMARY_KEY_AA
CWD_DIRECTORYIDCWD_DIRECTORY_OPERATIONDIRECTORY_IDFK_DIRECTORY_OPERATIONPRIMARY_KEY_AA
CWD_DIRECTORYIDCWD_GROUPDIRECTORY_IDFK_DIRECTORY_IDPRIMARY_KEY_AA
CWD_DIRECTORYIDCWD_GROUP_ATTRIBUTEDIRECTORY_IDFK_GROUP_ATTR_DIR_IDPRIMARY_KEY_AA
CWD_DIRECTORYIDCWD_USERDIRECTORY_IDFK_USER_DIR_IDPRIMARY_KEY_AA
CWD_DIRECTORYIDCWD_USER_ATTRIBUTEDIRECTORY_IDFK_USER_ATTR_DIR_IDPRIMARY_KEY_AA
CWD_GROUPIDCWD_GROUP_ATTRIBUTEGROUP_IDFK_GROUP_ATTR_ID_GROUP_IDPRIMARY_KEY_C
CWD_GROUPIDCWD_MEMBERSHIPCHILD_GROUP_IDFK_CHILD_GRPPRIMARY_KEY_C
CWD_GROUPIDCWD_MEMBERSHIPPARENT_IDFK_PARENT_GRPPRIMARY_KEY_C
CWD_USERIDCWD_MEMBERSHIPCHILD_USER_IDFK_CHILD_USERPRIMARY_KEY_A3
CWD_USERIDCWD_USER_ATTRIBUTEUSER_IDFK_USER_ATTRIBUTE_ID_USER_IDPRIMARY_KEY_A3
CWD_USERIDCWD_USER_CREDENTIAL_RECORDUSER_IDFK2RFDH2AP00B8MHOLDSY1B785BPRIMARY_KEY_A3
EXTERNAL_ENTITIESIDEXTERNAL_MEMBERSEXTENTITYIDFKADLKFU6A03U8F8BS82LM4QLG1PRIMARY_KEY_6D
GROUPSIDEXTERNAL_MEMBERSGROUPIDFK47K0FUDQNBNSBW0YW44UCSU2RPRIMARY_KEY_7D
GROUPSIDLOCAL_MEMBERSGROUPIDFKI71UOMCF4F9SESIBDHSMFDBGHPRIMARY_KEY_7D
KEYSTOREKEYIDTRUSTEDAPPPUBLIC_KEY_IDFKM7N581Y7GROA49TYGAPKMNFIVPRIMARY_KEY_4D
LABELLABELIDCONTENT_LABELLABELIDFK91V3V5NEMR532QQ4GLA9SJ9TFPRIMARY_KEY_44
LABELLABELIDNOTIFICATIONSLABELIDFK4TCCRJAMRJVMD2AOGL3HKLPFJPRIMARY_KEY_44
OS_GROUPIDOS_USER_GROUPGROUP_IDFKM2O7638OJNKI05I3U0N5OEPOPPRIMARY_KEY_DB
OS_USERIDOS_USER_GROUPUSER_IDFK6W5BWO7289K947EE5FWEC30JVPRIMARY_KEY_E6
PAGETEMPLATESTEMPLATEIDCONTENT_LABELPAGETEMPLATEIDFK28KIFOKT21QD9GES0Q0WV0FB9PRIMARY_KEY_BC
PAGETEMPLATESTEMPLATEIDPAGETEMPLATESPREVVERFK4WGWY1DQCI8RCWAD4TNQBGLT8PRIMARY_KEY_BC
SPACESSPACEIDCONTENTSPACEIDFKLMWEU06NFT59G7MW1I1MYORYSPRIMARY_KEY_92
SPACESSPACEIDNOTIFICATIONSSPACEIDFKMQE1PHE52XWQC4HK4IB8P9EH6PRIMARY_KEY_92
SPACESSPACEIDPAGETEMPLATESSPACEIDFK18A1D37PVQ2O9HU5X3TPS97MXPRIMARY_KEY_92
SPACESSPACEIDSPACEPERMISSIONSSPACEIDFKBI3X723M8FBGOKO3S84F9ODDLPRIMARY_KEY_92
TRUSTEDAPPTRUSTEDAPPIDTRUSTEDAPPRESTRICTIONTRUSTEDAPPIDFKJOFK5643721EFTOW3NJWR73AAPRIMARY_KEY_DDB
USER_MAPPINGUSER_KEYCONTENTCREATORFK_CONTENT_CREATORPRIMARY_KEY_13
USER_MAPPINGUSER_KEYCONTENTLASTMODIFIERFK_CONTENT_LASTMODIFIERPRIMARY_KEY_13
USER_MAPPINGUSER_KEYCONTENTUSERNAMEFK_CONTENT_USERNAMEPRIMARY_KEY_13
USER_MAPPINGUSER_KEYCONTENT_LABELOWNERFK_CONTENT_LABEL_OWNERPRIMARY_KEY_13
USER_MAPPINGUSER_KEYCONTENT_PERMCREATORFK_CONTENT_PERM_CREATORPRIMARY_KEY_13
USER_MAPPINGUSER_KEYCONTENT_PERMLASTMODIFIERFK_CONTENT_PERM_LASTMODIFIERPRIMARY_KEY_13
USER_MAPPINGUSER_KEYCONTENT_PERMUSERNAMEFK_CONTENT_PERM_USERNAMEPRIMARY_KEY_13
USER_MAPPINGUSER_KEYCONTENT_RELATIONCREATORFK_C2CRELATION_CREATORPRIMARY_KEY_13
USER_MAPPINGUSER_KEYCONTENT_RELATIONLASTMODIFIERFK_C2CRELATION_LASTMODIFIERPRIMARY_KEY_13
USER_MAPPINGUSER_KEYEXTRNLNKSCREATORFK_EXTRNLNKS_CREATORPRIMARY_KEY_13
USER_MAPPINGUSER_KEYEXTRNLNKSLASTMODIFIERFK_EXTRNLNKS_LASTMODIFIERPRIMARY_KEY_13
USER_MAPPINGUSER_KEYFOLLOW_CONNECTIONSFOLLOWEEFK_FOLLOW_CONNECTIONS_FOLLOWEEPRIMARY_KEY_13
USER_MAPPINGUSER_KEYFOLLOW_CONNECTIONSFOLLOWERFK_FOLLOW_CONNECTIONS_FOLLOWERPRIMARY_KEY_13
USER_MAPPINGUSER_KEYLABELOWNERFK_LABEL_OWNERPRIMARY_KEY_13
USER_MAPPINGUSER_KEYLIKESUSERNAMEFK_LIKES_USERNAMEPRIMARY_KEY_13
USER_MAPPINGUSER_KEYLINKSCREATORFK_LINKS_CREATORPRIMARY_KEY_13
USER_MAPPINGUSER_KEYLINKSLASTMODIFIERFK_LINKS_LASTMODIFIERPRIMARY_KEY_13
USER_MAPPINGUSER_KEYLOGININFOUSERNAMEFK_LOGININFO_USERNAMEPRIMARY_KEY_13
USER_MAPPINGUSER_KEYNOTIFICATIONSCREATORFK_NOTIFICATIONS_CREATORPRIMARY_KEY_13
USER_MAPPINGUSER_KEYNOTIFICATIONSLASTMODIFIERFK_NOTIFICATIONS_LASTMODIFIERPRIMARY_KEY_13
USER_MAPPINGUSER_KEYNOTIFICATIONSUSERNAMEFK_NOTIFICATIONS_USERNAMEPRIMARY_KEY_13
USER_MAPPINGUSER_KEYPAGETEMPLATESCREATORFK_PAGETEMPLATES_CREATORPRIMARY_KEY_13
USER_MAPPINGUSER_KEYPAGETEMPLATESLASTMODIFIERFK_PAGETEMPLATES_LASTMODIFIERPRIMARY_KEY_13
USER_MAPPINGUSER_KEYSPACEPERMISSIONSCREATORFK_SPACEPERMISSIONS_CREATORPRIMARY_KEY_13
USER_MAPPINGUSER_KEYSPACEPERMISSIONSLASTMODIFIERFK_SPACEPERMISSIONS_LASTMODIFIPRIMARY_KEY_13
USER_MAPPINGUSER_KEYSPACEPERMISSIONSPERMUSERNAMEFK_SPACEPERMISSIONS_PERMUSERNAPRIMARY_KEY_13
USER_MAPPINGUSER_KEYSPACESCREATORFK_SPACES_CREATORPRIMARY_KEY_13
USER_MAPPINGUSER_KEYSPACESLASTMODIFIERFK_SPACES_LASTMODIFIERPRIMARY_KEY_13
USER_MAPPINGUSER_KEYTRACKBACKLINKSCREATORFK_TRACKBACKLINKS_CREATORPRIMARY_KEY_13
USER_MAPPINGUSER_KEYTRACKBACKLINKSLASTMODIFIERFK_TRACKBACKLINKS_LASTMODIFIERPRIMARY_KEY_13
USER_MAPPINGUSER_KEYUSER_RELATIONSOURCEUSERFK_RELATION_U2USUSERPRIMARY_KEY_13
USER_MAPPINGUSER_KEYUSER_RELATIONTARGETUSERFK_RELATION_U2UTUSERPRIMARY_KEY_13
USER_MAPPINGUSER_KEYUSER_RELATIONCREATORFK_U2URELATION_CREATORPRIMARY_KEY_13
USER_MAPPINGUSER_KEYUSER_RELATIONLASTMODIFIERFK_U2URELATION_LASTMODIFIERPRIMARY_KEY_13
USER_MAPPINGUSER_KEYUSERCONTENT_RELATIONSOURCEUSERFK_RELATION_U2CUSERPRIMARY_KEY_13
USER_MAPPINGUSER_KEYUSERCONTENT_RELATIONCREATORFK_U2CRELATION_CREATORPRIMARY_KEY_13
USER_MAPPINGUSER_KEYUSERCONTENT_RELATIONLASTMODIFIERFK_U2CRELATION_LASTMODIFIERPRIMARY_KEY_13
USERSIDLOCAL_MEMBERSUSERID

FKRCUYOPTNAD1POS41GP1B1F3PI

PRIMARY_KEY_4D4

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.

TableDescription
cwd_userInformation for each user in Confluence.
cwd_groupThe groups to which users can belong.
cwd_membershipMapping the membership of users to groups.

cwd_directory

The user directories in your Confluence site. Examples of directories are the Confluence internal directory, or an LDAP directory.
cwd_applicationThe applications (Jira, Confluence, and so on) defined in the authentication framework.
cwd_app_dir_group_mapping Groups assigned to each application.
cwd_app_dir_mapping Directories assigned to each application.
cwd_app_dir_operation Application-level permissions for adding, modifying and removing users, groups and roles from a directory.
cwd_application_address Remote addresses currently assigned to each application.
cwd_application_attribute Attributes for an application.
cwd_directory_attribute Attributes for a directory.
cwd_directory_operation Permissions for adding, modifying and removing users, groups and roles from a directory.
cwd_group_attribute Attributes for a group.
cwd_synchronisation_status 

Stores the status of the current and most recent synchronization for each user directory

cwd_synchronisation_token Stores information about the synchronization token used in external user directories' incremental synchronization.
cwd_tombstone Records removed users, groups, memberships and aliases during incremental synchronization for external user directories.
cwd_user_attribute Attributes for a user.
cwd_user_credential_record Hashed passwords for each user.
remembermetoken Stores 'Remember me' token upon successful user login. Remember me feature is enforced by default when Confluence is clustered.

Content

This section describes the tables involved in storing content. Content is the information that Confluence users are storing and sharing.

TableDescription
AO_* 

Active Objects (AO) tables - stores app/plugin data. 

attachmentdataThe 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.

attachments

Only present for Confluence sites created prior to Confluence 5.5, where Confluence was configured to store attachments in the database.
bodycontentThe content of Confluence pages. No version information or other metadata is stored here. That is all in the content table.
contentA persistence table for the ContentEntityObject class of objects. The subclass is indicated by the contenttype column.
content_labelArbitrary text labels for content.
labelThe other half of the content_label system.

content_perm

Content-level permissions objects.
content_perm_setA one-to-many mapping for content items and their permissions, with added metadata.
pagetemplatesThe back end of the templates feature.
likesThe pages and other content liked by a particular user.
follow_connectionsA mapping of users who are following other users.
content_relation Stores interactions between users, content and spaces.
contentproperties Stores metadata of certain types of contents (including apps), as well as Synchrony caches.
user_mapping Link between cwd_user and other tables where a username is needed.
user_relation, usercontent_relation Stores interactions between users, content and spaces.

Clustering

The following table contains information about clustered Confluence sites.

TableDescription

clustersafety

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.
scheduler_clustered_jobs Stores configurations of scheduled jobs in Confluence.
scheduler_run_details Records run details of scheduled jobs in Confluence.

System information

These tables store data related to the status and configuration of the Confluence site.

TableDescription

confversion

Used by the upgrade system to determine what to expect from the database, so as to negotiate upgrades.
plugindataA 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.
confzdu Used by Confluence to perform a rolling upgrade
diagnostics_alerts Stores diagnostics alerts to provide information that admins can use when troubleshooting problems with their site.

Spaces

This table is related to the management of spaces.

TableDescription

spaces

Information about the spaces themselves: key, human-friendly name and numeric ID.
spacepermissionsInformation about permissions and restrictions for spaces.

Appearance

The following table contains information about the look and feel of your Confluence site.

TableDescription

decorator

The custom display templates used to customize Velocity layouts.

Synchrony

The following table contains information about Synchrony, which is used for collaborative editing.

TableDescription

event

Stores all events that happen in the editor.
secretsUsed for authenticating Synchrony with Confluence.
snapshotsA cache of events that happen in the editor. 

Miscellaneous

This section includes other tables worth commenting on.

TableDescription

os_propertyentry

Arbitrary association of entities and properties.
bandanaA 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.
extrnlnksReferral 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.

indexqueueentriesManages 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.
keystoreUsed by the trusted apps framework to store the server's private key, and other servers' public keys.
linksTracks links within the server (that is, across and within spaces).
notificationsStores page- and space-level watches.
trackbacklinksTrackback links.
confancestorsUsed to speed up permissions checks, by allowing quick lookup of all a page's ancestors.
denormalised-*Several tables used by the faster permissions service to denormalise permissions records. 
audit* Entries and configurations for the Audit Log.
imagedetails Used to store metadata for images' attachments.
logininfo Records login details of Confluence users. 
mig_* Entries and configurations for Confluence Cloud Migration Assistant app.
most_used_labels_cache Used to store adaptive most used label caches, which was implemented to tackle performance issue with labels.
Last modified on Jul 29, 2022

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.