数据库结构图
结构图细节
下面的 SVG 图片(可缩放矢量图)包括了 Confluence 数据库中使用的所有表。单击下面的连接在你的浏览器中打开图片连接,你也可以随后将图片下载到本地。你可以使用浏览器的缩放快捷键(Ctrl++ 或 Cmd++)来在图片中查看更多细节。
结构图概述
下面的图片显示了核心的表。请注意,这个图片非常大,你需要下载这个图片(右键图片后单击保存)然后在图片浏览器中进行查看。可选的,你可以使用前面提供的 SVG 图片链接来查看 SVG 图片。
数据库表和参考
扩展下面的链接来显示主要的表格和每一个表格的外键。
单击这里来显示/隐藏表格...
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 |
下面的部分描述来在 Confluence 每一个逻辑部分分类所使用的表格 —— 授权,内容,系统信息等。
授权(Authentication)
下面的表格对用户授权有关的信息进行存储,这部分是通过嵌入到 Confluence 中的 Atlassian Crowd 框架实现的。
表格(Table) | 描述(Description) |
---|
cwd_user | Confluence 中每一个用户的信息。 |
cwd_group | 每一个用户所属的用户组。 |
cwd_membership | 用户和用户组的映射关系。 |
cwd_directory
| Confluence 站点中的用户目录。比如说 Confluence 使用的内部目录或者一个 LDAP 目录。 |
cwd_application | 在授权框架中定义的应用程序(JIRA,Confluence 等)。 |
内容(Content)
这部分的内容描述了有关 Confluence 存储内容所使用的表格。内容是用户在 Confluence 存储和分享的信息。
表格(Table) | 描述(Description) |
---|
attachmentdata | 附件文件的二进制数据。当 Confluence 配置使用数据库保存附件文件的时候,这个表格是唯一使用的表格。否则的话,Confluence 将会将附件存储到本地文件系统中。 |
attachments
| Confluence 页面中的附件文件的元数据(Metadata )。 |
bodycontent | Confluence 页面中存储的的内容。版本信息和其他元数据不会存储到这里,这些内容都在 content 表中。 |
content | 为 ContentEntityObject 类提供的持久化对象。其子类通过 contenttype 列进行定义。 |
content_label | 有关内容的文本属性标签。 |
label | content_label 系统中存储的另一部分内容。 |
content_perm
| 对象权限的内容级别。 |
content_perm_set | 内容项目和内容项目权限的一对多(one-to-many)映射,这部分是在添加元数据后的。 |
pagetemplates | 后台使用的模板特性。 |
likes | 特定用户赞(liked)过的页面和其他内容。 |
follow_connections | 一个用户关注(following)其他用户的映射列表。 |
集群(Clustering)
下面的表格包含了 Confluence 站点使用集群的信息。
表格(Table) | 描述(Description) |
---|
clustersafety
| 在通常的情况下,这个表格只有一条记录。 safetynumber 的值是 Confluence 被用来如何找到其他的 Confluence 站点,这些站点是共享数据库但是又不在同一个集群里面。 |
这些表格有存储数据相关的状态和 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 | 通过快速查看所有页面的上级祖先来提高权限检查的速度。 |