Chapter
10 Cross Check Functions & Data
1 The CRUD Matrix After you have created your data models and your function models, you need to crosscheck them to ensure that they are complementary. In this chapter we examine the importance of this task and demonstrate how the Matrix Diagrammer can assist in what would otherwise be a time-consuming and laborious exercise. The CRUD matrix is a variation on an age-old tool, the two-dimensional chart. It specifically enables you to check which entities are used by a particular function and how they are used. By the end of functional analysis you should have built an application hierarchy that identifies the functions to be automated in the new system. You should also have defined data usages for each of these functions. You use the CRUD matrix to get a summary view of the defined data usages; you can also use it to add or amend usages. It is important to define correctly, from a business perspective, what data is used and how it is used, because the Application Design Transformer uses the function:entity usages to create module:table usages.
Figure 1 The CRUD Matrix
1.1 Components of a CRUD Matrix A standard matrix has three components: a column axis, a row axis and an intersection cell: In a CRUD matrix, the two axes refer to functions and entities. There is no rule as to whether entities should go on the row axis and functions on the column axis or vice versa. 1.1.1 The Intersection Cell The intersection cell always displays details of the usage, normally in terms of C (create), R (retrieve), U (update), and D (delete). You can choose to use other letters or symbols instead of the usual C, R, U, and D. You can also use a symbol to separate the C, R, U, and D indicators and another symbol to indicate where a property of an association is missing.
1.1.2 Creating the CRUD Matrix 1. Select File—>New or click the New Matrix icon in the drawing toolbar. A dialog box appears through which you select the repository element types that you require for the Row and Column axes of the matrix. 2. In the Row box select either Business Functions or Entities. Notice that the list of element types in the Column box reduces so that you can see only those that are applicable to your choice of row element. 3. Select either Business Functions or Entities from the Column list. 4. Click OK. A Settings dialog box then appears. 5. From the Settings Row tab, choose the element properties that you want to view in the rows. 6. From the Settings Column tab, choose the element properties that you want to view in the columns. 7. From the Settings Intersection tab, click to indicate that you want to display Create, Retrieve, Update, and Delete usages in the intersection box.
8.
Click OK to display the matrix.
1.1.3 Customizing the Matrix You can change the settings for the diagram at any time by selecting Edit—>Settings. The Settings dialog allows you to customize a matrix to suit your requirements.
Setting View Description Specify the properties of an element you wish to display. You should keep these to a minimum to avoid overcrowding the matrix. Typically, you display the name of an entity and the label, or possibly the short description, of a function. Define a sort order for the properties of an element type. Normally you sort on only one property, typically the entity name or the function label. The sort order can be ascending or descending alphabetical order. Filter the list of element instances so that you view only the subset in which you are interested. You can filter on any property. For the CRUD matrix, to display only leaf functions, you filter on the Atomic property. 1. Click in the Filter field on the Atomic
Order
Filter
row.
2. Type the following text: =’Y’
1.1.4 Updating Data Usages Through a CRUD Matrix Having checked your matrix for inaccuracies, inconsistencies, and omissions you may need to amend or add to the data usages. You can do this through the matrix itself. The Matrix Diagrammer has two component windows: the Matrix window and the property palette. You modify the diagram through the property palette. The property palette is not displayed until you select an intersection cell.
1.1.4.1 Property Palette
The property palette displays the names of the function and the entity whose usage is defined by the intersection and the properties that you can specify for the usage. You amend the properties by selecting from the drop-down list. When you save the updated properties, the matrix is updated. 1.2 Other Types of Matrix The matrix is a useful tool throughout the project life cycle. As you can see from the list of element types available for you to base your row and column axes on, there are many different types of matrixes. While the CRUD matrix is essential for the task of cross-checking functions and entities, there are other matrixes that are useful during the Analysis phase: The Business Function:Business Unit matrix defines how a given function is used in or by a particular business area. Business unit is another term for organization unit. The Business Function:Attribute matrix is a more detailed form of the function:entity matrix.
Figure 2 Other Matrix Uses
2 Quality Reports Designer/2000 has a large number of reports that you can run against the models you have created in the Repository. Invoke Repository Reports by clicking on its icon in the Designer/2000 window. The reports are grouped into thirteen categories. Expand a category to view the individual reports in that group. To obtain a detailed description of a report, use the context-sensitive Help button (?) in the toolbar. Reports that help you to check the quality of the analysis are located in various report groups:
Some data analysis reports are located in the Entity Relationship Modelling group. Some function analysis reports are located in the Function Event Modelling group. Some specific quality-checking reports are located in the Quality group. You should become familiar with the content and format of these reports. The following reports are available for your use. 1. Entity Completeness Checks 2. Function Completeness Checks 3. Entity Definition 4. Attribute Definition 5. Attributes in a Domain 2.1 How to Run a Report 1. Select a report in the Repository Reports window. A parameters palette appears in the right-hand side of the screen. 2. Set the report-specific parameters; that is, those that appear under the ‘Copies’ option in the Parameters palette. The parameters are different for each report and are fully explained in the online descriptions for each report. 3. To run the report, do one of the following actions: 4. Click the Run button in the toolbar Double-click the report name Click the right-hand mouse button and select Run Report