When you create a retention policy, you can associate it to one or more entities. Entity association identifies the records to which the retention policy applies and specifies the rules that Data Archive uses to calculate the expiration date for a record.
When you associate a retention policy to an entity, the policy applies to all records in the entity, but not to reference tables, if you have not selected the checkbox to update the retention to reference tables. For example, you associate a 10 year retention policy with records in the EMPLOYEE entity so that employee records expire 10 years after the employee termination date. Each employee record references the DEPT table in another entity. The retention policy does not apply to records in the DEPT table reference tables.
For entities with unrelated tables, you can only use an absolute-date based retention policy.
Entities used in a retention policy must have a driving table with at least one physical or logical primary key defined.
When you associate a retention policy to an entity, you can configure the following types of rules that Data Archive uses to calculate expiration dates:
General Retention
Bases the retention period for records on the archive job date. The expiration date for each record in the entity equals the retention period plus the archive job date. For example, records in an entity expire five years after the archive job date.
Column Level Retention
Bases the retention period for records on a column in an entity table. The expiration date for each record in the entity equals the retention period plus the date in a column. For example, records in the EMPLOYEE entity expire 10 years after the date stored in the EMP.TERMINATION_DATE column.
Expression-Based Retention
Bases the retention period for records on a date value that an expression returns. The expiration date for each record in the entity equals the retention period plus the date value from the expression. For example, records in the CUSTOMER table expire five years after the last order date, which is stored as an integer.