There are situations, as with any database, where integrity issues may occur with the data not matching what is defined in the schema. This could be due to a number of reasons such as:
- Items of data that have not yet been populated
- Mandatory categories or frames that have not been populated
With Cradle also providing the facility for data to be imported and captured in a number of different ways, it is inevitable that the integrity of this data may be questionable. Document Loader, capture add-ins and import are some of these mechanisms and, despite some protective settings in these tools, it is still possible to bring in data that does not match the current schema.
In addition to this, it is possible to import a project schema itself or modify the project setup which would impact the data that already exists in the database:
- Changing item attributes, categories and frames
- Changing link rules
For these reasons, Cradle provides two utilities in WorkBench that check the data in comparison to Project Setup:
- Item Integrity Check
- Cross Reference Integrity Check
For both of these utilities, the user MUST have ACCESS_BYPASS privilege to instigate any changes to the data. It is highly recommended that there are no other active users in the database when the checkers are ran. One way to ensure this is to lock the project using Project Manager.
We also recommend that you take a backup of your database and/or create a snapshot prior to making any changes with these utilities.
In this blog we will focus on the Item Integrity Checker.
Item Integrity Checker
The Item Integrity Checker is split into two parts:
- Frame version checks
- Item checks
Frame Version Checks
Cradle item types contain a type of attribute called a frame. Each frame can store or manage up to 1 TByte of any kind of data. An item can contain any number of frame attributes.
In practice, most frames store a small amount of text.
These item types also have a mechanism called edit history that records any changes that are made to an item. Each edit contains:
- The date and time the edit occurred
- The Cradle username of the person who performed the edit
- The reason the edit was performed, this description is optional
- A list of all the attributes (predefined, category values and frames) that were changed in the edit and their old and new values
For frames, it records the frame version numbers before and after the edit. All the frames versions are held within the item’s frame.
These frame version checks detect:
- Missing version of any frames
- Missing records in any version of any frame
To run this utility, select the item type(s) you want to check or All to check all item types. Then press the left-most Check button.
This will check all of the items in each item type selected to ensure each frame has a version of 0 and that all history for that frame, occurs in an accumulative sequence of 0, 1, 2, 3 etc and produce both a report and a summary in the dialog.
Notice in the dialog, that the Fix button becomes activated.
Pressing this button will repair the history records and can be checked by repeating the process:
On the right-hand side of the Item Integrity Check dialog, you will see a list of item checks that can be selected, or press All to select and run all checks.
These item checks compare the data that is held in the database with the currently defined settings in Project Setup to ensure they are consistent. If they are not, the utility will list any possible issues.
Once you have pressed the Check button, a report is produced and a summary appears in the dialog:
As with the frame integrity check, there is a Fix button but this can only apply to a number of checks. The ones that cannot be automatically fixed will appear on the report and will require some user intervention to correct the issue.
Below is a list of the issues that can be automatically fixed:
In this post we have addressed some of the checks that can be run on items in the database to confirm their data integrity using the Item Integrity Checker.
Please remember that the user MUST have ACCESS_BYPASS privilege to instigate any changes to the data and it is highly recommended that there are no other active users in the database.
Next we will discuss the Cross Reference Integrity Checker.