The Archive Database at a Glance
The eight tables Archive adds, the columns it adds to existing tables, and how they join.
Archive uses the same SQL database as core DMSync and adds eight tables. It also adds columns to Documents, Workspaces and Folders.
The eight tables
| Table | What it holds |
|---|---|
ArchiveRules | Criteria that drive automated archives |
| RestoreArchiveRules | Criteria that drive automated restores |
| DeleteArchiveRules | Criteria that drive automated deletions |
| ArchiveRequests | One row per archive, restore or delete operation, whatever raised it |
| ArchiveAudit | One row per document processed, for archives and restores |
| DeleteArchiveAudit | The equivalent audit trail for deletions |
| ArchiveLocations | Registered archive destinations |
| ArchiveProcessPermissions | A single row holding three global on/off switches |
Note ArchiveProcessPermissions and DeleteArchiveAudit do not appear in the Quick Reference Guide or the Workflow Guide. Both are real and both matter.
How requests join to content
Archive requests and the content they touch
Primary keys are UID everywhere except ArchiveProcessPermissions.Id and DeleteArchiveAudit.Id. Only one foreign key is enforced in the entire Archive schema — ArchiveRules.ArchiveLocationId to ArchiveLocations.UID. Every other relationship is logical, so the database will not stop you writing an orphan.
The joins you will actually use
-- a request and its audit trail
ArchiveAudit.ArchiveRequestUID = ArchiveRequests.UID
-- a request and the content it touched
Documents.ArchiveRequestId = ArchiveRequests.UID
Documents.RestoreRequestId = ArchiveRequests.UID
Documents.DeleteArchiveRequestId = ArchiveRequests.UID
-- the rule that raised a request
ArchiveRules.RuleName = ArchiveRequests.RuleName
-- deletions audit separately
DeleteArchiveAudit.DeleteRequestId = ArchiveRequests.UID
DeleteArchiveAudit.DeleteRuleId = DeleteArchiveRules.UID
Workspaces and Folders carry the same three request columns as Documents and join the same way.

