Section 0: Module Objectives or Competencies
Course Objective or Competency | Module Objectives or Competency |
---|---|
The student will be able to assess and apply Object-Oriented analysis and design methods like use cases to express user requirements, UML modeling, and other OO approaches. | Understand the rules and style guidelines for CRUDE matrices. |
Understand the processes used to create CRUDE matrices. | |
Be able to create CRUDE matrices. |
Section 1: Overview
CRUD was discussed in relation to data flow diagramming.
- NOTE: An E has been added to CRUD to allow documentation of the execution of OO operations that do not create, read, update, or delete but that instead simply are executed for possible side-effect purposes.
CRUDE analysis is one useful technique to identify how the underlying objects in the problem domain work together to collaborate in support of the use cases
-
CRUDE analysis uses a CRUDE matrix, in which each interaction among objects is labeled with a letter for
the type of interaction:
- C for create
- R for read or reference
- U for update
- D for delete
- E for execute
Section 2: Example
The following figure shows the CRUDE matrix based on the Make Old Patient Appt use case:

Each cell in the matrix represents the interaction between instances of the classes.
For example, in the use case for Make Appt shown below, an instance of the Receptionist actor creates an instance of the Appointment class.
- Assuming a Row:Column ordering, a C is placed in the cell Receptionist:Appointment.
- In addition, an instance of the Receptionist actor references an instance of the Appointments class, so in this case, an R is placed in the Receptionist:Appointments cell.

Section 3: Details
A CRUDE matrix is most useful as a system-wide representation, unlike the interaction diagrams and behavioral state machines.
Once a CRUDE matrix is completed for the entire system, the matrix can be scanned quickly to ensure that every class can be instantiated.
-
Each type of interaction can be validated for each class.
- For example, if a class represents only temporary objects, then the column in the matrix should have a D in it somewhere.
- Otherwise, the instances of the class will never be deleted.
- Because a data warehouse contains historical data, objects that are to be stored in one should not have any U or D entries in their associated columns.
- In this way, CRUDE analysis can be used as a way to partially validate the interactions among the objects in an object-oriented system.
The more interactions among a set of classes, the more likely they should be clustered together in a collaboration.
- The number and type of interactions are only an estimate at this point in the development of the system.
- Care should be taken when using this technique to cluster classes to identify collaborations.
CRUDE analysis also can be used to identify complex objects.
- The more (C)reate, (U)pdate, or (D)elete entries in the column associated with a class, the more likely the instances of the class have a complex life cycle.
- As such, these objects are candidates for state modeling with a behavioral state machine.