The KB Update SQL Tool provides (as its name suggests) a means for you to manually modify the content of the Analysis schema once a job or set of jobs have been executed and the results stored. There are many reasons for this requirement, but to give you some examples of how the tool could be used here is a small list:
- Update/create links that have been omitted by analyzers when dynamic programming is in use
- Update erroneous links identified by grep searches
- Managing specific situations (e.g. Java frameworks)
- Overcoming specific limitations inherent in a CAST analyzer (for example searching using the parent type and not just on the object name (e.g.: "class.function()" calls in the Universal Analyzer), ability to handle virtual functions and the ability to ignore links)
A feature Transaction Graph Adjustment allows users to make changes to links used for building Transaction graphs which are used for the majority of Function Point computations. As of AIP Core 8.3.1, this same feature also applies to links retrieved for building graphs used for computing the Risk Index of Transactions.
Indeed the so called "adjusted" links are only taken into account for computing the former Transaction and Risk Index graphs, but contrary to the KB Update SQL Tool, genuine links are left unchanged in the Analysis Service schema. Users who intend to use the KB Update SQL Tool for changing links which are part of Transaction and/or Risk Index graphs should, for these specific links, consider using the Transaction Graph Adjustment feature instead.
What can be done with the KB Update SQL Tool?
The following processes are possible with the tool:
- Add a new object
- Add a new parent link (Belongs To) to an object
- Add/modify/delete the property of an existing object
- Delete existing links
- Delete existing objects
- Create new links between existing unlinked objects
How does the KB Update SQL Tool function?
When run, the KB Update SQL Tool functions as follows:
- Firstly, specific entry tables (see KB Update SQL Tool - CI entry tables for more information about the entry tables) in the Analysis schema are injected with specific data created by the user that determines how the Analysis schema will be modified. This is done in one of two ways (these methods can be chosen in the tool itself):
- Via an SQL query or queries executed against the Analysis schema to insert the required data into the entry tables
- Via a call to an external program which inserts the required data into the entry tables
- Lastly, the Analysis schema update is carried out using the data that was inserted into the entry tables
What happens when the KB Update SQL Tool is run?
When you run the KB Update SQL Tool, three things will happen:
- Entry tables initialized - the contents of the CAST entry tables will be cleared in preparation for your new data
- Data entry - the data in your query is then inserted into the CAST entry tables
- Data consistency checks - checks are then carried out on the data in the entry tables that you want to execute. These checks will make sure that what you propose to do meets a set of predetermined criteria (for example if you attempt to create a parent type link (Belongs To) that makes an existing child object the parent object, and an existing parent object the child object, then this will be rejected). If an error is encountered, the job execution will be stopped and error messages will be created enabling you to debug the problem. See KB Update SQL Tool - Error handling for more information about this. The procedure CI_CHECK_DATA will be executed to carry out the checks.
- Data processing - finally the data inserted into the entry tables (if all checks are passed) is then processed. The procedure CI_PROCESS_DATA will be executed to process the data.
The following limitations are current:
- If the object you are modifying is not already managed by the CAST metamodel (e.g. where the object = 1 for an SQL table), then the KeyClass will be 0. The result of this is that the object will not be visible in CAST Enlighten.
- Please note that if you attempt to add a file as a new object, the column ObjFilRef is not updated when the assistant is run. The impact of this is in CAST Enlighten, which will attempt to retrieve the contents of a file (Code Viewer etc.) using the ObjFilRef and RefPath columns. It is not possible to add properties to a link - note that in AIP Core ≥ 8.3.45, this is now possible via the following tables - see KB Update SQL Tool - Modifying link properties:
- It is not possible to create an Escalated link via the KB Update SQL Tool