Confluence Data Model

This document provides a diagram of the Confluence schema and a conceptual overview of the data model.


  • 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-5.1.1.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

Detailed diagrams

The following SVG images (Scalable Vector Graphics) include all the tables in the Confluence database. Click the links below to open the images in your browser, or download the SVG files for later use. You can use the browser's zoom (Ctrl++ or Cmd++) to see more detail in the diagrams:

Overview diagram

This image shows the core tables. Note that the image is very large. You may need to download it (right-click on the image) and view it in an image viewer. Alternatively, use the SVG images linked in the previous section.

  Click here to show/hide the image...

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...
Primary key table name Primary key column name Foreign key table name Foreign key column name Foreign key name Primary key name
AO_9412A1_AOUSER ID AO_9412A1_USER_APP_LINK USER_ID fk_ao_9412a1_user_app_link_user_id AO_9412A1_AOUSER_pkey
attachments attachmentid attachmentdata attachmentid fk9dc3e34d34a4917e attachments_pkey
attachments attachmentid attachments prevver fk54475f9017d4a070 attachments_pkey
attachments attachmentid content_label attachmentid fkf0e7436e34a4917e attachments_pkey
attachments attachmentid imagedetails attachmentid fka768048734a4917e attachments_pkey
content contentid attachments pageid fk54475f908c38fbea content_pkey
content contentid bodycontent contentid fka898d4778dd41734 content_pkey
content contentid confancestors ancestorid fk9494e23c37e35a2e content_pkey
content contentid confancestors descendentid fk9494e23cc45e94dc content_pkey
content contentid content prevver fk6382c05917d4a070 content_pkey
content contentid content parentid fk6382c05974b18345 content_pkey
content contentid content parentcommentid fk6382c059b97e9230 content_pkey
content contentid content pageid fk6382c0598c38fbea content_pkey
content contentid content_label contentid fkf0e7436e8dd41734 content_pkey
content contentid content_perm_set content_id fkbf45a7992caf22c1 content_pkey
content contentid contentproperties contentid fk984c5e4c8dd41734 content_pkey
content contentid extrnlnks contentid fk97c10fe78dd41734 content_pkey
content contentid likes contentid fk4514b9c8dd41734 content_pkey
content contentid links contentid fk45157998dd41734 content_pkey
content contentid notifications pageid fk594acc88c38fbea content_pkey
content contentid spaces homepage fk9228242d11b7bfee content_pkey
content contentid spaces spacedescid fk9228242d2c72d3d2 content_pkey
content contentid trackbacklinks contentid fkf6977a478dd41734 content_pkey
content_perm_set id content_perm cps_id fkbd74b31676e33274 content_perm_set_pkey
cwd_app_dir_mapping id cwd_app_dir_group_mapping app_dir_mapping_id fk_app_dir_group_mapping cwd_app_dir_mapping_pkey
cwd_app_dir_mapping id cwd_app_dir_operation app_dir_mapping_id fk_app_dir_mapping cwd_app_dir_mapping_pkey
cwd_application id cwd_app_dir_group_mapping application_id fk_app_dir_group_app cwd_application_pkey
cwd_application id cwd_app_dir_mapping application_id fk52050e2fb347aa6a cwd_application_pkey
cwd_application id cwd_application_address application_id fk_application_address cwd_application_pkey
cwd_application id cwd_application_attribute application_id fk_application_attribute cwd_application_pkey
cwd_directory id cwd_app_dir_group_mapping directory_id fk_app_dir_group_dir cwd_directory_pkey
cwd_directory id cwd_app_dir_mapping directory_id fk_app_dir_dir cwd_directory_pkey
cwd_directory id cwd_directory_attribute directory_id fk_directory_attribute cwd_directory_pkey
cwd_directory id cwd_directory_operation directory_id fk_directory_operation cwd_directory_pkey
cwd_directory id cwd_group directory_id fk_directory_id cwd_directory_pkey
cwd_directory id cwd_group_attribute directory_id fk_group_attr_dir_id cwd_directory_pkey
cwd_directory id cwd_user directory_id fk_user_dir_id cwd_directory_pkey
cwd_directory id cwd_user_attribute directory_id fk_user_attr_dir_id cwd_directory_pkey
cwd_group id cwd_group_attribute group_id fk_group_attr_id_group_id cwd_group_pkey
cwd_group id cwd_membership parent_id fk_parent_grp cwd_group_pkey
cwd_group id cwd_membership child_group_id fk_child_grp cwd_group_pkey
cwd_user id cwd_membership child_user_id fk_child_user cwd_user_pkey
cwd_user id cwd_user_attribute user_id fk_user_attribute_id_user_id cwd_user_pkey
cwd_user id cwd_user_credential_record user_id fk76f874f73aee0f cwd_user_pkey
external_entities id external_members extentityid fkd8c8d8a5f25e5d5f external_entities_pkey
groups id external_members groupid fkd8c8d8a5117d5fda groups_pkey
groups id local_members groupid fk6b8fb445117d5fda groups_pkey
keystore keyid trustedapp public_key_id fkddb119ca9c85adb1 keystore_pkey
label labelid content_label labelid fkf0e7436e27072aef label_pkey
os_group id os_user_group group_id fk932472461e2e76db os_group_pkey
os_user id os_user_group user_id fk93247246f73aee0f os_user_pkey
pagetemplates templateid content_label pagetemplateid fkf0e7436ed32042e4 pagetemplates_pkey
pagetemplates templateid pagetemplates prevver fkbc7ce96a17d4a070 pagetemplates_pkey
spacegroups spacegroupid spacegrouppermissions spacegroupid fk487d958b16994414 spacegroups_pkey
spacegroups spacegroupid spaces spacegroupid fk9228242d16994414 spacegroups_pkey
spaces spaceid content spaceid fk6382c059b2dc6081 spaces_pkey
spaces spaceid notifications spaceid fk594acc8b2dc6081 spaces_pkey
spaces spaceid pagetemplates spaceid fkbc7ce96ab2dc6081 spaces_pkey
spaces spaceid spacepermissions spaceid fkd33f23beb2dc6081 spaces_pkey
trustedapp trustedappid trustedapprestriction trustedappid fke8496ba235d1d865 trustedapp_pkey
users id local_members userid fk6b8fb445ce2b3226 users_pkey

The following sections describe the principal tables involved in each logical area of Confluence – authentication, content, system information, and so on.


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.


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 when Confluence is configured to store attachments in the database. Otherwise, attachments are stored in the local file system.


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


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.

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.


This table is related to the management of spaces.

Table Description


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


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

Table Description


The custom display templates used to customise Velocity layouts.


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.

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.

Was this helpful?

Thanks for your feedback!

Why was this unhelpful?

19 Archived comments

  1. User avatar

    Michael Richards

    I think that there should be an index on the confancestors.ancestorid column.

    The current design is susceptible to performance problems when records are deleted from the content table.

    Tom Kyte (from Oracle) describes this issue in detail on his blog:

    09 Feb 2010
    1. User avatar

      Brian Cook

      We just ran into this exact problem a couple weeks ago.  Delete from content table caused a table lock, which turned into lots of blocking.  Our DBA opened a case with Oracle and came to this exact same conclusion that we need an index on the confancestors.ancestorid column.  I am interested in Atlassian's take on this and if they have any information on this.

      23 Aug 2010
      1. User avatar

        Sergey Svishchev

        Fixed in 5.3 –  CONF-22598 - The confancestors table should have an index for lookups by ancestorid Resolved

        But  CONF-24378 - Allow indexing for BODYCONTENT, BODYTYPEID to improve performance Resolved  and especially  CONF-21909 - Deadlocks in Oracle 11G due to missing indexes Resolved  are still not fixed

        24 Jun 2014
  2. User avatar

    Olivier Dupuy


    The table SPACEGROUPPERMISSIONS is missing in the above diagram.
    I have it in my versions 2.8.10 (and empty) and I am not sure if it still applies in 3.X but if this is the case then thanks to add it.
    More generally if some tables are created/updated/deleted a post it on the diagram could specify the table, the version and the type of event.

    Just upgraded to 3.4 and some new tables are here.
    I have also noticed some new indexes but no new columns but I can be wrong.
    The new tables are:


    Thanks to update the diagram



    13 Oct 2010
    1. User avatar


      We upgraded from 3.1.0 to 3.4.9 but I can't see the REMEMBERMETOKEN table in the database. We use ldap integration for password authentication.

      28 Mar 2011
      1. User avatar

        Olivier Dupuy

        Using LDAP too. If you search for "remember" or remembermetoken in the online doc you will find some references.
        The table seems used for seraph (?) which should explain why our table is (present but) empty.

        28 Mar 2011
  3. User avatar



    We are using Active directory for user management, so the external_entities table contains companyid in the name field. How to get the user name from Active directory using Ldap.Using Beanscript we can get the Ldap user details but it will be good if we get the username from Ldap using SQL Plugin. 

    Is it possible to get the username, email id from Active directory using SQL Plugin from Confluence?

    Could anyone comment on this?



    14 Dec 2010
  4. User avatar

    Stanislav Kalianov

    Is there XML schema file, that could be used for validating space export XML?

    Can this be made public?

    04 Mar 2011
    1. User avatar

      Sarah Maddox [Atlassian]

      Hallo Stanislav

      Unfortunately, there's no schema for the space export XML.

      Cheers, Sarah

      16 Apr 2013
  5. User avatar

    Helen Newnham


    Could we get this updated to reflect the big schema changes in Confluence 3.5?  Alternatively, could you give some detail on where to find the Hibernate mapping files in the jar and how to analyse them?

    many thanks.

    28 Sep 2011
  6. User avatar

    Michael Rieger


    I agree with Helen: It would be very nice if the data model graph would reflect the current version of the data model. Not the one that was used more than six months ago...


    Thanks for updating!


    30 Dec 2011
    1. User avatar


      I agree with Michael Rieger and Helen Newnham an update would be really appreciated

      13 Sep 2012
      1. User avatar

        Sarah Maddox [Atlassian]

        Hallo all

        I've updated the data model to reflect the current database design. Sorry about the delay!

        Cheers, Sarah

        16 Apr 2013
  7. User avatar


    I cannot read the database diagram at the top of this page because the font is so small. We need a diagram that can be expanded to a much larger size.

    05 Nov 2012
    1. User avatar

      Sarah Maddox [Atlassian]

      Hallo there

      I've added a couple of SVG diagrams, which you can expand using the browser's zoom.

      Cheers, Sarah

      16 Apr 2013
  8. User avatar


    Would login information, including date/time, be stored anywhere here?  I've searched the database columns and it's not obvious.

    20 Aug 2013
  9. User avatar

    Uday Kumar

    How can we add a database table/Use a new custom database table from custom plugin.

    We are developing a plugin which requires a table and do some insertions and updations from xwork action class. How can we do that?


    29 Oct 2013
  10. User avatar

    Joshua Thompson

    This schema does not make mention of the user_mapping table which is required to get useful statistical information out of tables like notifications or content (which was added in 5.1 or 5.2). Including the latest database model would be very useful.

    09 Dec 2013
  11. User avatar

    Jim Mackley

    I need to run a report when a user is deleted in Confluence Wiki for our Auditors.  Is there user_deleted or user_retired or user_archived field in one of the tables?  I looked at this url and did not find anything: file:///C:/Users/jpmackl/Downloads/ConfluenceTables-AllColumns.svg

    If there is not a field indicating when a user was deleted, purged or archived from the Confluence Wiki database, can this be added?

    It's seems like auditors want this kind of stuff all the time now.   Thank you!


    25 Nov 2014
Powered by Confluence and Scroll Viewport