Use Cases and UML Class Diagrams

Use Cases and UML Class Diagrams

by Chase Sonnemaker -
Number of replies: 0

Use cases appear to vary in definition online. Some define use cases as what the system should be able to do from the user perspective (more zoomed in) while others define them as bigger-picture uses of the database. For the more zoomed-in version, this database would have three types of actors. The database administrator (currently my group), users, and possibly external applications. I included a simplified use case diagram to show how the specific use cases relate to each actor. Below are more detailed versions of the use cases.

·       Query Database

1.     A user or application has access to the database

2.     The actor applies a valid SELECT SQL statement to the database

3.     The database returns a table based on the SELECT statement

·       Pull Data

1.     An external application has access to the database through a connector

2.     The application queries the database

3.     The application withdraws the resulting table for use in a website or data analysis

·       Stop Modification

1.     A user or application has access to the database

2.     The actor attempts to apply an invalid statement that would modify the data

3.     The database system does not allow the change

4.     The database system sends a message notifying the actor that they cannot change the data

·       Update Attributes

1.     A database administrator has admin privileges and access to the database

2.     A Turing winner gets a new job or passes away

3.     The administrator writes an UPDATE SQL statement and executes it

4.     The database information is updated, and a message is returned mentioning the update

·       Adjust Tuning Parameters

Note: I am not really sure how this works; however, I would expect the database administrator to be able to use the database to increase the efficiency of it

·       Insert Records

1.     A database administrator has admin privileges and access to the database

2.     Another Turing winner is selected

3.     The administrator writes an INSERT SQL statement for each table with information about the new winner(s) and executes them

4.     The information is added to the database and a message is returned mentioning the change

 

For the bigger picture version some use cases of this particular database might include…

·       Keeping records of Turing winners for future generations

·       Storing and retrieving data on Turing winners for data analysis

·       For use in a web application that allows people to research Turing winners

·       For use by individuals curious about Turing winners

·       For use in future projects and CSC 230 classes

 

While researching class diagrams for database design, I also found two schools of thought for how a model of a database or database table should be laid out. One technique is more conceptual, based on a generalized view of the database, while the other has a few more specifics including explicit specification of keys and other important constraints. Below I have a more general example of my group’s entire database and an example including keys of just the main table of our database.

 

Sources

https://stackoverflow.com/questions/21358774/database-design-using-uml-class-diagram - Database UML Diagram

https://docs.aws.amazon.com/documentdb/latest/developerguide/document-database-use-cases.html - Database Use Cases Examples

https://www.bridging-the-gap.com/what-is-a-use-case/ – How to Write a Use Case?

https://www.visual-paradigm.com/guide/uml-unified-modeling-language/what-is-use-case-diagram/ - What is a Use Case Diagram?


Attachment Turing DB 2.png
Attachment Turing Winners DB UML.png
Attachment Use Cases.PNG