80 likes | 197 Views
Repository Use Cases and CRUD. Repository Use Cases. There are four main operations that are commonly performed on repositories, whether they are files or true databases: C reate – create and add an item to the repository R ead – view a repository item U pdate – edit a repository item
E N D
Repository Use Cases There are four main operations that are commonly performed on repositories, whether they are files or true databases: • Create – create and add an item to the repository • Read – view a repository item • Update – edit a repository item • Delete – remove a repository item These operations are collectively known as CRUD. In most applications, there will be at least one CRUD use case. For example, this semester’s project may include a CRUD use case for maintaining the repository of CS, IS, and GEP courses. You may also have other repositories that require maintenance. The following slides show a suggested way in which you can handle CRUD use cases in your SRS.
Suggested Approach for Our Class • Have a top-level use case called something like Maintain X Repository (e.g., Maintain Accounts Repository) • Write a corresponding specification for this use case. The use case should include viewing the repository as one of the steps in the Main Scenario. • Draw a sub-use case diagram for Maintain X Repository that has three extensions for • creating an item (e.g., Create Account) in the X repository, • editing an item in the X repository, and • deleting an item from the X repository. • For our class, you donot need to have a specification for each of these three extended use cases. (In industry, these might need to be written.)
role name external system name system name Top-level use case diagram with a CRUD use case 1 Use Case 1 Name 2 Use Case 2 Name 3 Maintain X Repository n Use Case n Name CRUD use case
role name external system name All dependencies are extend unless stereotyped otherwise. CRUD Sub-Use Case Diagram 3c Delete Y 3 Maintain X Repository 3b Edit Y 3a Create Y “Y” is one of the items in the “X” repository