One of the most common questions students and inexperienced practitioners ask when creating a use case model is how to write CRUD (create, read, update and delete) use cases. There are several options to represent these functions:
- Not representing it as a use case (Bittner; Spence, 2002; Lily, 2000)
- Create one “manage” use case.
- Create, update, and delete functions are represented as alternative flows (Cockburn, 2000)
- The use case has several basic flows (Övergaard; Palmkvist, 2004)
- Create each use case separately.
- Use the extends relationship from a “read” use case.
- The create, update, and delete use case has a includes relationship with a “read” use case.
- Use a precondition to specify specific CRUD use cases from a base use case (Cockburn, 2000)
- Represent the use cases without any relationships.
Even though this is a common issue, there is no correct answer for this question. It is a matter of preference. In fact, this is one of the main problems of the use case technique: there is no single method. Each author proposes different terminology, concepts, semantics, templates, rules, and guidance on how to create them (another post presents the result of a survey on use case concepts). Continue reading