Confluence Data Model

Still need help?

The Atlassian Community is here for you.

Ask the community

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 Name Primary Key Column Name Foreign Key Table Name Foreign Key Column Name Foreign Key Name Primary Key Name
AUDITRECORD AUDITRECORDID AUDIT_AFFECTED_OBJECT AUDITRECORDID FK_AFFECTED_OBJECT_RECORD PRIMARY_KEY_D
AUDITRECORD AUDITRECORDID AUDIT_CHANGED_VALUE AUDITRECORDID FK_CHANGED_VALUE_RECORD PRIMARY_KEY_D
CONTENT CONTENTID ATTACHMENTDATA ATTACHMENTID FKJNH4YVWEN0176QSVH4RPSRY2J PRIMARY_KEY_6
CONTENT CONTENTID BODYCONTENT CONTENTID FKMBYIAYESFP1EIQ6GMOL3MK3YL PRIMARY_KEY_6
CONTENT CONTENTID CONFANCESTORS DESCENDENTID FKLMHSIPSWOL8IMEQSG906IH62X PRIMARY_KEY_6
CONTENT CONTENTID CONFANCESTORS ANCESTORID FKSQB1AF9H7FVQTGY73O8JDCUUE PRIMARY_KEY_6
CONTENT CONTENTID CONTENT PARENTCOMMENTID FKAL6O8XWYPD4MDGID9B9NW1Q51 PRIMARY_KEY_6
CONTENT CONTENTID CONTENT PARENTCCID FKFIYHKA48C7E776QJ90KLBPM9Q PRIMARY_KEY_6
CONTENT CONTENTID CONTENT PREVVER FKK6KBB7SUQELOJ82NX7XDCD803 PRIMARY_KEY_6
CONTENT CONTENTID CONTENT PARENTID FKOXTT893WEUJKYH0IICOXSM37V PRIMARY_KEY_6
CONTENT CONTENTID CONTENT PAGEID FKWJYN6091Q3L1GL7BH143MA2A PRIMARY_KEY_6
CONTENT CONTENTID CONTENT_LABEL CONTENTID FKI8CVAHSU6D2Y285VTRP4NHC3W PRIMARY_KEY_6
CONTENT CONTENTID CONTENT_PERM_SET CONTENT_ID FK2BUUNK1HOR0I3K0M3NT03HW1W PRIMARY_KEY_6
CONTENT CONTENTID CONTENT_RELATION SOURCECONTENTID FKE2A00URQYXMYAJ3JOP48UB8QD PRIMARY_KEY_6
CONTENT CONTENTID CONTENT_RELATION TARGETCONTENTID FKIPR00838MKLN699CIMD7RG17X PRIMARY_KEY_6
CONTENT CONTENTID CONTENTPROPERTIES CONTENTID FK3FLY21XFK13RQH63TXW2T6K2V PRIMARY_KEY_6
CONTENT CONTENTID EXTRNLNKS CONTENTID FK5V5LW9X88VM27RVUBSC130NJY PRIMARY_KEY_6
CONTENT CONTENTID IMAGEDETAILS ATTACHMENTID FK2301QICIUQ6SC32JAJ8TYSG3S PRIMARY_KEY_6
CONTENT CONTENTID LIKES CONTENTID FKBDOIWI70I7O3TC7HPBU4VNLMY PRIMARY_KEY_6
CONTENT CONTENTID LINKS CONTENTID FKN8MYCKO8FRERNE7BRH5NR1CSR PRIMARY_KEY_6
CONTENT CONTENTID NOTIFICATIONS CONTENTID FK_NOTIFICATIONS_CONTENT PRIMARY_KEY_6
CONTENT CONTENTID SPACES SPACEDESCID FK7NDEWMRL3HQCPWC8EYDN9MV8J PRIMARY_KEY_6
CONTENT CONTENTID SPACES HOMEPAGE FKJ4CU5838AQCBW57WY7CKT0T7O PRIMARY_KEY_6
CONTENT CONTENTID TRACKBACKLINKS CONTENTID FK1TO6OMJL8NHEVCJBVPT3ED7NT PRIMARY_KEY_6
CONTENT CONTENTID USERCONTENT_RELATION TARGETCONTENTID FKPWGL85A266IIE5I0ADU8BDBCV PRIMARY_KEY_6
CONTENT_PERM_SET ID CONTENT_PERM CPS_ID FKDE5WL1CUR1SE9281GC0DSAWTB PRIMARY_KEY_BF
CWD_APP_DIR_MAPPING ID CWD_APP_DIR_GROUP_MAPPING APP_DIR_MAPPING_ID FK_APP_DIR_GROUP_MAPPING PRIMARY_KEY_2A
CWD_APP_DIR_MAPPING ID CWD_APP_DIR_OPERATION APP_DIR_MAPPING_ID FK_APP_DIR_MAPPING PRIMARY_KEY_2A
CWD_APPLICATION ID CWD_APP_DIR_GROUP_MAPPING APPLICATION_ID FK_APP_DIR_GROUP_APP PRIMARY_KEY_5
CWD_APPLICATION ID CWD_APP_DIR_MAPPING APPLICATION_ID FKSTEKJ41875RGSW8OTFFRAYHPL PRIMARY_KEY_5
CWD_APPLICATION ID CWD_APPLICATION_ADDRESS APPLICATION_ID FK_APPLICATION_ADDRESS PRIMARY_KEY_5
CWD_APPLICATION ID CWD_APPLICATION_ATTRIBUTE APPLICATION_ID FK_APPLICATION_ATTRIBUTE PRIMARY_KEY_5
CWD_DIRECTORY ID CWD_APP_DIR_GROUP_MAPPING DIRECTORY_ID FK_APP_DIR_GROUP_DIR PRIMARY_KEY_AA
CWD_DIRECTORY ID CWD_APP_DIR_MAPPING DIRECTORY_ID FK_APP_DIR_DIR PRIMARY_KEY_AA
CWD_DIRECTORY ID CWD_DIRECTORY_ATTRIBUTE DIRECTORY_ID FK_DIRECTORY_ATTRIBUTE PRIMARY_KEY_AA
CWD_DIRECTORY ID CWD_DIRECTORY_OPERATION DIRECTORY_ID FK_DIRECTORY_OPERATION PRIMARY_KEY_AA
CWD_DIRECTORY ID CWD_GROUP DIRECTORY_ID FK_DIRECTORY_ID PRIMARY_KEY_AA
CWD_DIRECTORY ID CWD_GROUP_ATTRIBUTE DIRECTORY_ID FK_GROUP_ATTR_DIR_ID PRIMARY_KEY_AA
CWD_DIRECTORY ID CWD_USER DIRECTORY_ID FK_USER_DIR_ID PRIMARY_KEY_AA
CWD_DIRECTORY ID CWD_USER_ATTRIBUTE DIRECTORY_ID FK_USER_ATTR_DIR_ID PRIMARY_KEY_AA
CWD_GROUP ID CWD_GROUP_ATTRIBUTE GROUP_ID FK_GROUP_ATTR_ID_GROUP_ID PRIMARY_KEY_C
CWD_GROUP ID CWD_MEMBERSHIP CHILD_GROUP_ID FK_CHILD_GRP PRIMARY_KEY_C
CWD_GROUP ID CWD_MEMBERSHIP PARENT_ID FK_PARENT_GRP PRIMARY_KEY_C
CWD_USER ID CWD_MEMBERSHIP CHILD_USER_ID FK_CHILD_USER PRIMARY_KEY_A3
CWD_USER ID CWD_USER_ATTRIBUTE USER_ID FK_USER_ATTRIBUTE_ID_USER_ID PRIMARY_KEY_A3
CWD_USER ID CWD_USER_CREDENTIAL_RECORD USER_ID FK2RFDH2AP00B8MHOLDSY1B785B PRIMARY_KEY_A3
EXTERNAL_ENTITIES ID EXTERNAL_MEMBERS EXTENTITYID FKADLKFU6A03U8F8BS82LM4QLG1 PRIMARY_KEY_6D
GROUPS ID EXTERNAL_MEMBERS GROUPID FK47K0FUDQNBNSBW0YW44UCSU2R PRIMARY_KEY_7D
GROUPS ID LOCAL_MEMBERS GROUPID FKI71UOMCF4F9SESIBDHSMFDBGH PRIMARY_KEY_7D
KEYSTORE KEYID TRUSTEDAPP PUBLIC_KEY_ID FKM7N581Y7GROA49TYGAPKMNFIV PRIMARY_KEY_4D
LABEL LABELID CONTENT_LABEL LABELID FK91V3V5NEMR532QQ4GLA9SJ9TF PRIMARY_KEY_44
LABEL LABELID NOTIFICATIONS LABELID FK4TCCRJAMRJVMD2AOGL3HKLPFJ PRIMARY_KEY_44
OS_GROUP ID OS_USER_GROUP GROUP_ID FKM2O7638OJNKI05I3U0N5OEPOP PRIMARY_KEY_DB
OS_USER ID OS_USER_GROUP USER_ID FK6W5BWO7289K947EE5FWEC30JV PRIMARY_KEY_E6
PAGETEMPLATES TEMPLATEID CONTENT_LABEL PAGETEMPLATEID FK28KIFOKT21QD9GES0Q0WV0FB9 PRIMARY_KEY_BC
PAGETEMPLATES TEMPLATEID PAGETEMPLATES PREVVER FK4WGWY1DQCI8RCWAD4TNQBGLT8 PRIMARY_KEY_BC
SPACES SPACEID CONTENT SPACEID FKLMWEU06NFT59G7MW1I1MYORYS PRIMARY_KEY_92
SPACES SPACEID NOTIFICATIONS SPACEID FKMQE1PHE52XWQC4HK4IB8P9EH6 PRIMARY_KEY_92
SPACES SPACEID PAGETEMPLATES SPACEID FK18A1D37PVQ2O9HU5X3TPS97MX PRIMARY_KEY_92
SPACES SPACEID SPACEPERMISSIONS SPACEID FKBI3X723M8FBGOKO3S84F9ODDL PRIMARY_KEY_92
TRUSTEDAPP TRUSTEDAPPID TRUSTEDAPPRESTRICTION TRUSTEDAPPID FKJOFK5643721EFTOW3NJWR73AA PRIMARY_KEY_DDB
USER_MAPPING USER_KEY CONTENT CREATOR FK_CONTENT_CREATOR PRIMARY_KEY_13
USER_MAPPING USER_KEY CONTENT LASTMODIFIER FK_CONTENT_LASTMODIFIER PRIMARY_KEY_13
USER_MAPPING USER_KEY CONTENT USERNAME FK_CONTENT_USERNAME PRIMARY_KEY_13
USER_MAPPING USER_KEY CONTENT_LABEL OWNER FK_CONTENT_LABEL_OWNER PRIMARY_KEY_13
USER_MAPPING USER_KEY CONTENT_PERM CREATOR FK_CONTENT_PERM_CREATOR PRIMARY_KEY_13
USER_MAPPING USER_KEY CONTENT_PERM LASTMODIFIER FK_CONTENT_PERM_LASTMODIFIER PRIMARY_KEY_13
USER_MAPPING USER_KEY CONTENT_PERM USERNAME FK_CONTENT_PERM_USERNAME PRIMARY_KEY_13
USER_MAPPING USER_KEY CONTENT_RELATION CREATOR FK_C2CRELATION_CREATOR PRIMARY_KEY_13
USER_MAPPING USER_KEY CONTENT_RELATION LASTMODIFIER FK_C2CRELATION_LASTMODIFIER PRIMARY_KEY_13
USER_MAPPING USER_KEY EXTRNLNKS CREATOR FK_EXTRNLNKS_CREATOR PRIMARY_KEY_13
USER_MAPPING USER_KEY EXTRNLNKS LASTMODIFIER FK_EXTRNLNKS_LASTMODIFIER PRIMARY_KEY_13
USER_MAPPING USER_KEY FOLLOW_CONNECTIONS FOLLOWEE FK_FOLLOW_CONNECTIONS_FOLLOWEE PRIMARY_KEY_13
USER_MAPPING USER_KEY FOLLOW_CONNECTIONS FOLLOWER FK_FOLLOW_CONNECTIONS_FOLLOWER PRIMARY_KEY_13
USER_MAPPING USER_KEY LABEL OWNER FK_LABEL_OWNER PRIMARY_KEY_13
USER_MAPPING USER_KEY LIKES USERNAME FK_LIKES_USERNAME PRIMARY_KEY_13
USER_MAPPING USER_KEY LINKS CREATOR FK_LINKS_CREATOR PRIMARY_KEY_13
USER_MAPPING USER_KEY LINKS LASTMODIFIER FK_LINKS_LASTMODIFIER PRIMARY_KEY_13
USER_MAPPING USER_KEY LOGININFO USERNAME FK_LOGININFO_USERNAME PRIMARY_KEY_13
USER_MAPPING USER_KEY NOTIFICATIONS CREATOR FK_NOTIFICATIONS_CREATOR PRIMARY_KEY_13
USER_MAPPING USER_KEY NOTIFICATIONS LASTMODIFIER FK_NOTIFICATIONS_LASTMODIFIER PRIMARY_KEY_13
USER_MAPPING USER_KEY NOTIFICATIONS USERNAME FK_NOTIFICATIONS_USERNAME PRIMARY_KEY_13
USER_MAPPING USER_KEY PAGETEMPLATES CREATOR FK_PAGETEMPLATES_CREATOR PRIMARY_KEY_13
USER_MAPPING USER_KEY PAGETEMPLATES LASTMODIFIER FK_PAGETEMPLATES_LASTMODIFIER PRIMARY_KEY_13
USER_MAPPING USER_KEY SPACEPERMISSIONS CREATOR FK_SPACEPERMISSIONS_CREATOR PRIMARY_KEY_13
USER_MAPPING USER_KEY SPACEPERMISSIONS LASTMODIFIER FK_SPACEPERMISSIONS_LASTMODIFI PRIMARY_KEY_13
USER_MAPPING USER_KEY SPACEPERMISSIONS PERMUSERNAME FK_SPACEPERMISSIONS_PERMUSERNA PRIMARY_KEY_13
USER_MAPPING USER_KEY SPACES CREATOR FK_SPACES_CREATOR PRIMARY_KEY_13
USER_MAPPING USER_KEY SPACES LASTMODIFIER FK_SPACES_LASTMODIFIER PRIMARY_KEY_13
USER_MAPPING USER_KEY TRACKBACKLINKS CREATOR FK_TRACKBACKLINKS_CREATOR PRIMARY_KEY_13
USER_MAPPING USER_KEY TRACKBACKLINKS LASTMODIFIER FK_TRACKBACKLINKS_LASTMODIFIER PRIMARY_KEY_13
USER_MAPPING USER_KEY USER_RELATION SOURCEUSER FK_RELATION_U2USUSER PRIMARY_KEY_13
USER_MAPPING USER_KEY USER_RELATION TARGETUSER FK_RELATION_U2UTUSER PRIMARY_KEY_13
USER_MAPPING USER_KEY USER_RELATION CREATOR FK_U2URELATION_CREATOR PRIMARY_KEY_13
USER_MAPPING USER_KEY USER_RELATION LASTMODIFIER FK_U2URELATION_LASTMODIFIER PRIMARY_KEY_13
USER_MAPPING USER_KEY USERCONTENT_RELATION SOURCEUSER FK_RELATION_U2CUSER PRIMARY_KEY_13
USER_MAPPING USER_KEY USERCONTENT_RELATION CREATOR FK_U2CRELATION_CREATOR PRIMARY_KEY_13
USER_MAPPING USER_KEY USERCONTENT_RELATION LASTMODIFIER FK_U2CRELATION_LASTMODIFIER PRIMARY_KEY_13
USERS ID LOCAL_MEMBERS USERID

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.

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.

cwd_directory

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. This table is only used in older Confluence versions where Confluence was configured to store attachments in the database. Otherwise, attachments are stored in the local file system.

attachments

Metadata for the files attached to Confluence pages.
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_perm

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

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.

System information

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

Table Description

confversion

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

spaces

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

Appearance

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

Table Description

decorator

The custom display templates used to customize Velocity layouts.

Miscellaneous

This section includes other tables worth commenting on.

Table Description

os_propertyentry

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.
Last modified on Mar 7, 2019

Was this helpful?

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