|
||
Document data is stored in several joined tables that are used for the tree structure, multilingual support and custom document fields. The document record consists of the following tables:
•CMS_Tree - a table with basic document data shared between different language versions of same document. This table determines the tree structure of the website document content. It contains one record for all culture versions of the document. The table does not contain any versioned data.
•CMS_Document - a table with document data of a specific language version of the document. It contains several records for every document, each one representing one language version of the document. Some of the document columns are versioned columns.
•Coupled table - a table that contains document-type specific fields defined by the developer. For example the News document type has a Content_News coupled table that contains NewsTitle, NewsSummary, NewsText and other fields specific for news. Coupled table primary key is referenced by the value of DocumentForeignKeyValue column and the table is determined by type of the document. Container document types, such as folder, do not have any coupled table. All columns from coupled tables are versioned. Each culture version of the coupled document contains one record in the coupled table.
The following figure shows how the three tables are connected:
•CMS_Attachment - contains records representing document attachments.
•CMS_VersionHistory - contains records representing document versions. When a new document version is being created, it is only stored in this table. When it is published, respective records in the CMS_Tree and CMS_Document tables are updated with data from the new version record in this table.
•CMS_AttachmentHistory - contains records representing attachments of document versions. The main purpose of this table is to avoid redundancy when a new document version with the same attachments is created. When a new document version is published, respective records in the CMS_Attachment table are updated with data from the new version record in this table.
•CMS_VersionAttachment - contains records representing relationships between document versions and their document attachments.
Document relationships use the following database tables:
•CMS_Relationship - contains records representing relationships between two documents.
•CMS_RelationshipName - contains records representing relationship names.
•CMS_RelationshipNameSite - contains records representing assignments of relationship names to websites.