1

For what I know an extend relationship is when a use case is optional, but the include is when the operation of the use case it is needed (but not all the times). I want to model a use case for a registration system and came with a doubt about which relationship to use, the two possible options that I have are:

enter image description here

I am more keen on the (b) way of representing this action because the parts of modify data and delete data should not be optional and they serve for the maintenance of the students' records (sorry for the typo in my graph). Even though one colleague states that the (a) option is more accurate to deal with this situation. Can both be correct? and if it is the case in which situation this could happen? Thanks

Little
  • 2,841
  • 6
  • 33
  • 57

2 Answers2

2

When you are designing Use Cases, an easy trap to fall into is 'functional decomposition' where you break down a Use Case into too many sub cases. A classic here is in CRUD operations. While "Maintain Records" is a sensible use case, you rarely want to decompose this into Create Record, Delete Record etc. So to some extent, the answer to your question about 'include...' vs 'extend...' would be 'neither'.

Sometimes, say if one actor can search while only a specific actor can create a record, or if there's a particularly complex authentication step in deleting a record, you may want to make these separate Use Cases. In this case you may not need the 'Maintain Record' Use Case but would describe the two cases separately.

If you must have both then I would suggest that 'Modify Data' extends 'Maintain Records' because you may perform it sometimes but would not always.

Checkout this answer : CRUD in a use-case diagram?

And a discussion you might find useful is here http://www.se.cs.put.poznan.pl/knowledge-base/software-engineering-blog/crud-pattern-in-use-cases

Community
  • 1
  • 1
Dave Durbin
  • 3,339
  • 18
  • 31
0

I would say, it is better remove "maintenance of records" usecase from your diagram. It sounds like group of usecases. Modify data and Delete Data are two only usecases of this group.

Vladimir
  • 1,806
  • 11
  • 13