Administer > Database administration > Data persistence > Data maps > Create data maps to related records

Create data maps to related records

Applies to User Roles:

System Administrator

You can create data maps to related records across Service Manager tables to use with the purge and archive functions. The purpose of data maps is to identify related records of the records you select to purge or archive. All data maps use the same basic structure to search tables and fields for related records.

To create data maps to related records:

  1. Create one Type 0 data map record for each table to purge or archive. The Type 0 data map record typically identifies the primary key field of the table.

    Type 0 data map records are equivalent to the following SQL query:
    SELECT <fieldname> FROM <filename> WHERE <fieldname>=<Value in Map Query>

  2. Create one Type 1 data map record for each join field to query for related records. The Type 1 data map record uses only the join field to search for related records in the external file.
    • To specify additional selection criteria of records from the primary table, you can add a Map Query, which creates a Type 2 data map record.
    • To specify additional selection criteria for records in the external file, you can add an override query in the Override Qry field. Because this query overrides the field listed in the Field Name field, you must include the join field within this query.

    Type 1 data map records are equivalent to the following SQL query:
    SELECT [<override_qry> | <fieldname>] FROM <queryfile> WHERE <fieldname>=<value in filename>

  3. Create one Type 2 data map record for each join field that has additional selection criteria for records from the primary table. Type 2 data map records use the Map Query field in addition to the Field Name field to identify records from the primary table.

    Type 2 data map records are equivalent to the following SQL query:
    SELECT [<override_qry> | <fieldname>] FROM <queryfile> WHERE <fieldname>=<Value in filename> and <Value in Map Query>

Related topics

Data maps
Alternatives to data maps
Types of data maps
Exporting records
Importing records
Purging and archiving records
Unload script utility
Master data records

Add a data map record
Delete a data map record
Update a data map record
View a data map record