Page tree
Skip to end of metadata
Go to start of metadata

中文标题【Confluence 数据模型】

本文档提供了 Confluence 的数据结构视图(schema )和数据模型概念上的的概述。

备注:

  • Hibernate 的映射文件是针对 Confluence 数据模型的直接描述。在系统中的 Confluence 主 JRA 中你可以找到  *.hbm.xml 文件,JRA 位于()<CONFLUENCE-INSTALLATION>\confluence\WEB-INF\lib\confluence-5.1.1.jar)。
  • 数据库的表,列和其他的属性可能随着 Confluence 的主要发行版本的变化而有所变化。希望找到你 Confluence 站点的数据库定义语言(DDL),请在 Confluence 安装后运行查询。



本页中的内容:

数据库结构图

结构图细节

下面的 SVG 图片(可缩放矢量图)包括了 Confluence 数据库中使用的所有表。单击下面的连接在你的浏览器中打开图片连接,你也可以随后将图片下载到本地。你可以使用浏览器的缩放快捷键(Ctrl++ 或 Cmd++)来在图片中查看更多细节。

结构图概述

下面的图片显示了核心的表。请注意,这个图片非常大,你需要下载这个图片(右键图片后单击保存)然后在图片浏览器中进行查看。可选的,你可以使用前面提供的 SVG 图片链接来查看 SVG 图片。

数据库表和参考

扩展下面的链接来显示主要的表格和每一个表格的外键。

Primary key table namePrimary key column nameForeign key table nameForeign key column nameForeign key namePrimary key name
AO_9412A1_AOUSERIDAO_9412A1_USER_APP_LINKUSER_IDfk_ao_9412a1_user_app_link_user_idAO_9412A1_AOUSER_pkey
attachmentsattachmentidattachmentdataattachmentidfk9dc3e34d34a4917eattachments_pkey
attachmentsattachmentidattachmentsprevverfk54475f9017d4a070attachments_pkey
attachmentsattachmentidcontent_labelattachmentidfkf0e7436e34a4917eattachments_pkey
attachmentsattachmentidimagedetailsattachmentidfka768048734a4917eattachments_pkey
contentcontentidattachmentspageidfk54475f908c38fbeacontent_pkey
contentcontentidbodycontentcontentidfka898d4778dd41734content_pkey
contentcontentidconfancestorsancestoridfk9494e23c37e35a2econtent_pkey
contentcontentidconfancestorsdescendentidfk9494e23cc45e94dccontent_pkey
contentcontentidcontentprevverfk6382c05917d4a070content_pkey
contentcontentidcontentparentidfk6382c05974b18345content_pkey
contentcontentidcontentparentcommentidfk6382c059b97e9230content_pkey
contentcontentidcontentpageidfk6382c0598c38fbeacontent_pkey
contentcontentidcontent_labelcontentidfkf0e7436e8dd41734content_pkey
contentcontentidcontent_perm_setcontent_idfkbf45a7992caf22c1content_pkey
contentcontentidcontentpropertiescontentidfk984c5e4c8dd41734content_pkey
contentcontentidextrnlnkscontentidfk97c10fe78dd41734content_pkey
contentcontentidlikescontentidfk4514b9c8dd41734content_pkey
contentcontentidlinkscontentidfk45157998dd41734content_pkey
contentcontentidnotificationspageidfk594acc88c38fbeacontent_pkey
contentcontentidspaceshomepagefk9228242d11b7bfeecontent_pkey
contentcontentidspacesspacedescidfk9228242d2c72d3d2content_pkey
contentcontentidtrackbacklinkscontentidfkf6977a478dd41734content_pkey
content_perm_setidcontent_permcps_idfkbd74b31676e33274content_perm_set_pkey
cwd_app_dir_mappingidcwd_app_dir_group_mappingapp_dir_mapping_idfk_app_dir_group_mappingcwd_app_dir_mapping_pkey
cwd_app_dir_mappingidcwd_app_dir_operationapp_dir_mapping_idfk_app_dir_mappingcwd_app_dir_mapping_pkey
cwd_applicationidcwd_app_dir_group_mappingapplication_idfk_app_dir_group_appcwd_application_pkey
cwd_applicationidcwd_app_dir_mappingapplication_idfk52050e2fb347aa6acwd_application_pkey
cwd_applicationidcwd_application_addressapplication_idfk_application_addresscwd_application_pkey
cwd_applicationidcwd_application_attributeapplication_idfk_application_attributecwd_application_pkey
cwd_directoryidcwd_app_dir_group_mappingdirectory_idfk_app_dir_group_dircwd_directory_pkey
cwd_directoryidcwd_app_dir_mappingdirectory_idfk_app_dir_dircwd_directory_pkey
cwd_directoryidcwd_directory_attributedirectory_idfk_directory_attributecwd_directory_pkey
cwd_directoryidcwd_directory_operationdirectory_idfk_directory_operationcwd_directory_pkey
cwd_directoryidcwd_groupdirectory_idfk_directory_idcwd_directory_pkey
cwd_directoryidcwd_group_attributedirectory_idfk_group_attr_dir_idcwd_directory_pkey
cwd_directoryidcwd_userdirectory_idfk_user_dir_idcwd_directory_pkey
cwd_directoryidcwd_user_attributedirectory_idfk_user_attr_dir_idcwd_directory_pkey
cwd_groupidcwd_group_attributegroup_idfk_group_attr_id_group_idcwd_group_pkey
cwd_groupidcwd_membershipparent_idfk_parent_grpcwd_group_pkey
cwd_groupidcwd_membershipchild_group_idfk_child_grpcwd_group_pkey
cwd_useridcwd_membershipchild_user_idfk_child_usercwd_user_pkey
cwd_useridcwd_user_attributeuser_idfk_user_attribute_id_user_idcwd_user_pkey
cwd_useridcwd_user_credential_recorduser_idfk76f874f73aee0fcwd_user_pkey
external_entitiesidexternal_membersextentityidfkd8c8d8a5f25e5d5fexternal_entities_pkey
groupsidexternal_membersgroupidfkd8c8d8a5117d5fdagroups_pkey
groupsidlocal_membersgroupidfk6b8fb445117d5fdagroups_pkey
keystorekeyidtrustedapppublic_key_idfkddb119ca9c85adb1keystore_pkey
labellabelidcontent_labellabelidfkf0e7436e27072aeflabel_pkey
os_groupidos_user_groupgroup_idfk932472461e2e76dbos_group_pkey
os_useridos_user_groupuser_idfk93247246f73aee0fos_user_pkey
pagetemplatestemplateidcontent_labelpagetemplateidfkf0e7436ed32042e4pagetemplates_pkey
pagetemplatestemplateidpagetemplatesprevverfkbc7ce96a17d4a070pagetemplates_pkey
spacegroupsspacegroupidspacegrouppermissionsspacegroupidfk487d958b16994414spacegroups_pkey
spacegroupsspacegroupidspacesspacegroupidfk9228242d16994414spacegroups_pkey
spacesspaceidcontentspaceidfk6382c059b2dc6081spaces_pkey
spacesspaceidnotificationsspaceidfk594acc8b2dc6081spaces_pkey
spacesspaceidpagetemplatesspaceidfkbc7ce96ab2dc6081spaces_pkey
spacesspaceidspacepermissionsspaceidfkd33f23beb2dc6081spaces_pkey
trustedapptrustedappidtrustedapprestrictiontrustedappidfke8496ba235d1d865trustedapp_pkey
usersidlocal_membersuseridfk6b8fb445ce2b3226users_pkey

下面的部分描述来在 Confluence 每一个逻辑部分分类所使用的表格 —— 授权,内容,系统信息等。

授权(Authentication)

下面的表格对用户授权有关的信息进行存储,这部分是通过嵌入到 Confluence 中的  Atlassian Crowd 框架实现的。

表格(Table)描述(Description)
cwd_userConfluence 中每一个用户的信息。
cwd_group每一个用户所属的用户组。
cwd_membership用户和用户组的映射关系。

cwd_directory

Confluence 站点中的用户目录。比如说 Confluence 使用的内部目录或者一个 LDAP 目录。
cwd_application在授权框架中定义的应用程序(JIRA,Confluence 等)。

内容(Content)

这部分的内容描述了有关 Confluence 存储内容所使用的表格。内容是用户在 Confluence 存储和分享的信息。

表格(Table)描述(Description)
attachmentdata附件文件的二进制数据。当 Confluence 配置使用数据库保存附件文件的时候,这个表格是唯一使用的表格。否则的话,Confluence 将会将附件存储到本地文件系统中。

attachments

Confluence 页面中的附件文件的元数据(Metadata )。
bodycontentConfluence 页面中存储的的内容。版本信息和其他元数据不会存储到这里,这些内容都在 content 表中。
content ContentEntityObject 类提供的持久化对象。其子类通过  contenttype 列进行定义。
content_label有关内容的文本属性标签。
labelcontent_label 系统中存储的另一部分内容。

content_perm

对象权限的内容级别。
content_perm_set内容项目和内容项目权限的一对多(one-to-many)映射,这部分是在添加元数据后的。
pagetemplates后台使用的模板特性。
likes特定用户赞(liked)过的页面和其他内容。
follow_connections一个用户关注(following)其他用户的映射列表。

集群(Clustering)

下面的表格包含了 Confluence 站点使用集群的信息。

表格(Table)描述(Description)

clustersafety

在通常的情况下,这个表格只有一条记录。 safetynumber 的值是 Confluence 被用来如何找到其他的 Confluence 站点,这些站点是共享数据库但是又不在同一个集群里面。

系统信息(System information)

这些表格有存储数据相关的状态和 Confluence 站点的相关配置信息。

表格(Table)描述(Description)

confversion

被用来在升级系统的时候确定那个数据库的版本应该使用,这个表格只对数据库升级有影响。
plugindata记录系统安装所有的插件的版本和时间。
data 是一个 blob 字段,是插件使用的 JAR 文件,这个通常在集群使用的时候存储。

空间(Spaces)

这个表格与空间的管理有关。

表格(Table)描述(Description)

spaces

有关空间使用的信息:key,空间的名称和数字 ID。

展现(Appearance)

这部分存储了有关你 Confluence 的外观和布局使用的信息。

表格(Table)描述(Description)

decorator

使用自定义 Velocity 布局显示的自定义模板。

杂项(Miscellaneous)

这些部分是一些其他的表格,这些表格有必要在这里提及下能帮你更好的了解系统。

表格(Table)描述(Description)

os_propertyentry

有关实体和属性相关的特性。
bandana所有的持久层。这个表格包含的的内容有用户设置和空间,全局基本配置的数据和插件使用的存储,例如插件 Dynamic Task List plugin. Essentially,有关存储的特性并不在其他地方适用。
extrnlnks参考链接。
hibernate_unique_key

被用作为 高/低 ID 生成器 —— 这是被用来生成我们主键的一个子系统。

如果你调整这个表格的话,你将没有办法在 Confluence 创建对象。

indexqueueentries管理所有的 —— 全系统内容索引。这个表格通常包括有最近 12 小时(大致时间)的更新,允许在集群节点之间重启后进行重新同步。
keystore为信任的 app 框架使用,存储了服务器的私钥(private key)和其他服务器的公钥(public keys)。
links跟踪服务器内的连接(这个连接用于跨空间连接)。
notifications存储页面和空间级别的关注(watches)。
trackbacklinks方向链接。
confancestors通过快速查看所有页面的上级祖先来提高权限检查的速度。
  • No labels