• Skip to main content
  • Skip to primary sidebar
  • Computer Architecture
  • Computer Networks
  • DBMS
  • OS
  • Software Engineering
  • Security
  • OOT
binary-terms-logo

Binary Terms

The Computer Science & IT Guide

Sequence Model

A sequence model elaborates a use case and describes the interaction between the objects in a sequence over a period of time. Sequence model conceptualizes the interaction between the objects by displaying the exchange of messages between them over time.

The sequential model describes how the system parts interact to execute a use case and get a function done. In this section, we will be discussing, the sequence model in brief with the help of examples. So, let’s start.

Content: Sequence Model

  1. What is Sequence Model?
  2. Sequence Diagram
  3. Advantages of Sequence Model
  4. Key Takeaways

What is Sequence Model?

Sequence model is a behavioural model which shows a sequence of behaviour shown by the system to the user to execute a particular use case. This behavioural sequence is shown by the exchange of messages between the set of objects.

The messages that are shared by the objects can be procedural calls or asynchronous signals which are useful for the execution of the particular function in the system. Sequence model can be modelled in two ways the one form is the scenario and the other and more structured form is the sequence diagram.

Scenario

Scenario the word itself defines that it includes the written description of the details of an individual function. In term of sequence model, a scenario is the series of events that occurs in order over a period of time to execute a particular functionality of the system.

Well, it depends whether a scenario includes all events of the system or only those which are invoked by the object for the execution of a particular use case.

The scenario is helpful in two ways. While modifying a system, developers can refer to the scenario as a set of sequential historical events executing the actual system. Or while developing a new system, developers refer scenario as a set of events that would be required to execute a proposed system.

To understand the concept of scenario lets take an example where the scenario is the session with an online stock broker. The sequence of events that occur during this session is enclosed in the scenario.

Scenario- Sequence Model

Now, you can discover that the scenario displayed in the figure above is a high-level interaction. As the first event of the scenario which is John Doe logs in, itself has several messages to be exchanged between the Jhon and system. Like, the system asks for user name and password, Jhon then puts the user name and password, the system verifies the identification and then allow John to log in.

But, in the early stages, developers frame the scenario at a high level and then in later stages of development they concentrate on detailing of the events. The scenario includes exchanged messages and also the operations performed by the objects

So, first, the developers discover the objects that need to interact to execute an event. Between the interacting objects, the developers have to decide who will be the sender and the receiver of the message along with the sequence in which messages will be exchanged. After all this, operations are added for the internal computation and then the scenario is turned down to the code.

The next sequence model is a sequence diagram that is far more explanatory and well-structured which we are discussing in the section below.

Sequence Diagram

We have seen that the scenario is a written description of the interaction between the set of objects and is in text format. This makes it a little difficult to recognize the sender and receiver of the message. When there are more than two objects it becomes even more difficult to identify the sender and receiver from the interacting objects.

The sequence diagram clearly displays the sender and receiver of the message and also the sequence of the messages exchanged which provide a clear vision of the interaction between them. Thereby the sequence diagram reveals how the actors interact with the system to execute all or part of the use case.

Sequence diagram has components like:

  • The actor which are the entities that interact with the system or are external to the system.
  • Lifeline shows the amount of time spent by an actor or system during the interaction.
  • The message is the information sent by the sender to the receiver. The message is represented by a horizontal arrow in the sequence diagram where the arrowhead is towards the receiver of the message.
  • Messages can be synchronous which means the sender waits for the receiver to process the sent message before proceeding further.
  • Messages can be asynchronous where the sender proceeds without waiting for the receiver to complete the processing of the sent message.

The figure below shows the sequence diagram for the scenario that we have discussed above of a stock broker.

Sequence Diagram - Sequence Model

It is not compulsory that you should describe a use case in a single sequence diagram. It’s always better to show a portion of the use case, in a sequence diagram as large-scale interactions may have several independent tasks that could be combined in many ways.

So, instead of getting it messy by repeating the messages, we can implement a separate sequence diagram for each task. Like the figure below shows the sequence diagram for two independent tasks stock purchase and stock quote.

Sequence Diagram - Sequence Model 1

Sequence Diagram - Sequence Model 2

Definitely, every use case would have an exceptional condition for which a separate sequence diagram should be implemented. Like the sequence diagram below shows the exceptional case where a purchasing of the stock fails.
Sequence Diagram - Sequence Model 3

Advantages of Sequence Model

The advantages of sequence mode are as follow:

  1. Sequence model figures out the interaction between the user and system considering the time parameter.
  2. Sequence model eases the developers to understand the complicated functions of the proposed system or to document the existing system.
  3. Sequence model models the logic of complicated function in a graphical representation.
  4. Sequence model shows details the user and system interaction.

Key Takeaways

  • Sequence model elaborates the uses case.
  • Sequence model describes the communication between the set of objects.
  • Sequence diagram expresses the high-level interaction.
  • Sequence model is of two kinds scenario and sequence diagram.
  • The scenario is the written description of the events generated by the objects.
  • A sequence diagram shows the participation of each actor in the interaction.
  • Sequence diagram displays the interaction by the exchange of messages between the sender and receiver.
  • Sequence diagram displays the exchange of messages in an order in which they are exchanged.

So, this is all about the sequence model which helps the developers to understand the requirements of the proposed model and also helps the developers to document the already existing system.

Related Terms:

  1. Internet Control Message Protocol version 4 (ICMPv4)
  2. Network Security Model
  3. Use Case Relationship
  4. Class Model
  5. State Model

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Most Searched Terms

  • Directory Structure
  • Contiguous Memory Allocation
  • Addressing Mode and its Types
  • Pipelining
  • Vector Processing
  • Register Organization
  • Direct Memory Access (DMA)
  • Process Control Block (PCB)
  • Swapping in Operating System
  • Relational Data Model

Recent Additions

  • Types of Processors
  • Demand Paging in Operating System
  • Agents and Environment in Artificial Intelligence
  • Array Processor in Computer Architecture
  • Deadlock Avoidance in Operating System
  • Fragmentation in Operating System
  • Assembly Language in Computer
  • Control Signals in Computer Architecture
  • Memory Hierarchy in Computer Architecture
  • Ethernet in Computer Networks

Categories

  • Artificial Intelligence
  • Cloud Computing
  • Compiler Design
  • Computer Architecture
  • Computer Networks
  • Data Warehouse and Mining
  • DBMS
  • Object Oriented Technology
  • Operating System
  • Security
  • Software Engineering

Copyright © 2025 · Binary Terms · Contact Us · About Us · Privacy