Software Engineering basics - System Context Models and Use-Case Diagrams

1. System Context Model

A system context model is a conceptual representation that defines the boundary between a system and its external environment. It shows how the system interacts with external entities such as users, other systems, or devices.

In simple terms, it helps to identify what lies inside and outside the system, and what kinds of interactions (data, control, or signals) occur across the system boundary.


Purpose:

  • To understand the scope of the system.

  • To identify external entities that interact with the system.

  • To define inputs and outputs of the system.

  • To serve as a basis for developing use-case diagrams.


Elements of a System Context Model:

  • System: The main part under development, represented as a single process or box.

  • External entities (actors): People, organizations, or other systems interacting with the system.

  • Data or control flows: Show the type of interaction between the system and the external entities.


Example:
For a Library Management System, the system context model might include:

  • External Entities: Librarian, Member, Database System.

  • System Boundary: Library Management System.

  • Interactions:

    • Librarian updates book records.

    • Member borrows or returns books.

    • System interacts with database to store and retrieve data.


2. Use-Case Diagram

A use-case diagram is a UML (Unified Modeling Language) diagram that illustrates the functional requirements of a system — that is, what the system does from the user’s point of view.

It identifies actors (users or external systems) and their use cases (specific functions or services the system provides).


Components:

  • Actors: External entities interacting with the system.

  • Use Cases: Functions or actions the system performs.

  • System Boundary: Defines the scope of the system.

  • Associations: Lines connecting actors and use cases, showing interactions.


Example (Library Management System):

Actors:

  • Librarian

  • Member

Use Cases:

  • Add/Update Book Details

  • Issue Book

  • Return Book

  • Search Book

  • Register Member

Description:

  • The Librarian can add or update books and issue or return them.

  • The Member can search for and borrow books.


Relationship Between System Context Model and Use-Case Diagram:

  • The system context model defines the external environment and system boundaries.

  • The use-case diagram details how those external entities (actors) interact with the system to perform specific functions.

 

In essence, the context model shows who interacts with the system, while the use-case diagram shows how they interact.