How can i draw a use case diagram when there is 6 use cases and each has a crud operations?

98 views Asked by At

I was given a task by my teacher to create a use case diagram based on her given use cases below.

Administrator(Actor)

  Add User Account      
  Update User Account       
  Deactivate User Account       
  View User Account     
        
  Add User Group        
  Update User Group     
  Remove User Group     
  View User Group       
        
  Add Vendor        
  Update Vendor     
  Deactivate Vendor     
  View Vendor       
        
  Add Location      
  Update Location       
  Deactivate Location       
  View Location     
        
  Add Product Category      
  Update Product Category       
  Remove Product Category       
  View Product Category     
        
  Add Product       
  Update Product        
  Deactivate Product        
  View Product      

I tried to group each crud into 1, for example:

Manage User Account 
Manage User Group 
Manage Vendor 
Manage Location 
Manage Product Category 
Manage Product 

And each of them points into 1 use case which has the label (Add, Update, Deactivate and View) to avoid redundancy and minimize adding more use cases.

This is what I created:

enter image description here

Am I doing it right or is there a much better solution for creating a use case with multiple crud operations?

1

There are 1 answers

2
Christophe On

It is already a good idea to regroup CRUD use cases under a Manage xyz use case and like in this other question it is not clear why you feel obliged to split the CRUD one into more elementary ones, which only clutter your diagram.

The key solution seems to be generalization. In fact Manage a kind of Object is a vey general use-case, that you can specialize using two distinct generalization sets:

  • One one hand, by sub-goal: Create object of a kind, Retrieve object of a kind, Update object of a kind, Delete object of a kind;
  • On another hand by kind of object, e.g Product, Category, etc...

Doing so will still provide too many graphical elements, but reduce to 1 + 6 + 4 = 11 use cases (and only one associate with the actor, at the top of the generalization), instead of 6x4=24 with 6 actor associations.

Personally, I'd inest only in the top level, and keep the declination by kind of objects for the narrative, in tabular form, so that it'll be easy to add other kind of CRUD objects later on.