Week 10 - Systems Design
Week 10 - Systems Design
4. Prototyping (Optional)
This is an optional phase where a small, working model of the system
is built to test the feasibility of the design.
Activities:
Build a Prototype:
o Develop a simplified version of the system to test key
components.
User Feedback:
o Gather feedback from stakeholders or users based on the
prototype.
Iteration:
o Refine the design based on feedback and issues encountered
during prototyping.
5. Design Validation
In this phase, the design is validated to ensure it meets the system's
requirements. The aim is to identify and resolve any potential design
issues before implementation.
Activities:
Design Review:
o Conduct design reviews with stakeholders and team members to
verify the design against the requirements.
Feasibility Study:
o Assess whether the system design is feasible in terms of budget,
technology, and timeline.
Performance Evaluation:
o Evaluate the performance characteristics of the system, such as
expected load, latency, and throughput.
Security Review:
o Conduct security audits to ensure the system design addresses
security requirements.
6. Implementation Planning
Once the design is validated, planning for the actual system
implementation takes place.
Activities:
Implementation Strategy:
o Break down the system design into tasks and assign them to
development teams.
Timeline Estimation:
o Estimate time for developing each component or module.
Milestone Definition:
o Define key milestones for progress tracking (e.g., alpha version,
beta version, final release).
According to the size, complexity, and needs of the system being designed, there
are various forms of system design. Generally speaking, there are three
categories of system design: architectural, logical, and physical. These divisions
deal with different levels of abstraction, such as software, hardware, and
architecture.
Here are the primary types of system design, along with their characteristics:
1. Architectural Design (High-Level Design)
This type focuses on the overall structure of the system, defining the major
components and how they interact. It provides a blueprint of the system's
architecture without delving into the specifics of individual modules.
Characteristics:
Component-Based: Defines the main components (e.g., frontend, backend,
database) and their interactions.
System Boundaries: Specifies the boundaries of the system and what lies
outside (e.g., external services or third-party APIs).
Communication Patterns: Outlines how components will communicate
(e.g., REST APIs, message queues).
Technology Stack: High-level decisions on technologies (e.g., cloud vs on-
premise, SQL vs NoSQL).
Deployment Strategy: Includes deployment environments (e.g., cloud
infrastructure, distributed architecture).
Examples:
Monolithic Architecture: A single-tier, tightly coupled system where all
components are interconnected in one large application.
Microservices Architecture: A design where components are small,
independent services that communicate over the network.
Client-Server Architecture: Separates the system into clients (users) and
servers (which provide services or data).
2. Logical Design
This focuses on the functionality and behavior of the system. It defines the
relationships between various system components, modules, and their
functions, but abstracts away from physical implementations.
Characteristics:
Data Flow Diagrams (DFD): Describes how data flows through the system,
between users, applications, and storage.
Entity-Relationship Diagrams (ERD): Illustrates relationships between
data entities (e.g., user, order, product) and their attributes.
Process Logic: Defines the rules and conditions governing the system’s
behavior (e.g., how an order is processed).
Abstract Representation: Focuses on what the system does, not how it’s
implemented.
Examples:
Use Case Diagrams: Describes the interactions between users and the
system.
State Diagrams: Show how the system behaves in different states (e.g.,
pending, processed, shipped).
Class Diagrams: For object-oriented systems, shows the classes and their
relationships.
3. Physical Design
This deals with the physical aspects of the system, such as hardware,
storage, and networks. It defines how the system will be physically
implemented, including server setups, data storage mechanisms, and
network configurations.
Characteristics:
Hardware Specifications: Determines the physical components such as
servers, databases, load balancers, etc.
Network Design: Focuses on how the system will be connected, including IP
addresses, subnets, firewalls, and routing.
Storage Design: Specifies where and how data will be stored (e.g., local
disks, cloud storage, RAID).
Backup and Recovery Plans: Defines strategies for data redundancy,
backup, and disaster recovery.
Performance Optimization: Focuses on optimizing resource allocation,
including CPU, memory, and storage space.
Examples:
Server Configuration: Deciding on the number of servers, load balancing
strategies, and distributed systems setup.
Data Centers: Deciding whether to host the system on-premise or on cloud
platforms (e.g., AWS, Azure).
Physical Data Models: Detailing the actual physical storage mechanisms
and database configurations.
4. DFD vs ERD (Describe, list all the components, and give at least one example
per diagram)
Data Flow Diagram (DFD) vs Entity Relationship Diagram (ERD)
Two separate types of diagrams are used in system design to describe
different parts of a system's data and structure: entity relationship diagrams
(ERD) and data flow diagrams (DFD). While both are necessary instruments,
their functions and parts differ.
Here’s a detailed comparison of DFD and ERD, their components, and
examples for each.
1. Data Flow Diagram (DFD)
A Data Flow Diagram (DFD) is a graphical representation used to illustrate
the flow of data within a system, highlighting how data moves between
processes, external entities, data stores, and users. DFDs focus on how data
moves through the system and where it is stored or transformed.
Components of DFD:
1. Processes:
o Represent activities or tasks where data is processed.
2. Data Flows:
o Arrows that show the movement of data between processes, data
stores, and external entities.
o Example: A flow of "Customer Details" from the customer to a "Create
Account" process.
3. Data Stores:
o Represent places where data is stored for future use.
Levels of DFD:
Level 0 (Context Diagram): The highest level, representing the entire
system as a single process with external entities interacting with it.
Level 1, 2, ... N: More detailed breakdowns of the system processes.
Example of DFD:
Context Diagram (Level 0): Imagine a basic e-commerce system where
customers can place orders, and the system processes them.
External Entity: Customer
Process: "Order Processing"
Data Flow: Order Details flow from the customer to the process.
Data Store: Orders Database stores the processed orders.
2. Attributes:
o Represent characteristics or properties of an entity.
3. Relationships:
o Show how entities are related to each other (e.g., one-to-one, one-to-
many, many-to-many).
o Drawn as diamonds connecting entities.
6. Cardinality:
o Specifies the relationship between entities in terms of quantity (one-to-
one, one-to-many, etc.).
o Example: A customer can place many orders, but an order is placed by
only one customer (one-to-many relationship).
Example of ERD:
In an e-commerce system, we can represent customers, orders, and
products using an ERD.
Entities: Customer, Order, Product
Attributes: Customer has attributes like CustomerID, Name, Email. Order
has OrderID, OrderDate, etc.
Relationships: A customer can place many orders (one-to-many), and an
order can contain many products (many-to-many).
5. Flowchart (DFD vs ERD (Describe, list all the common symbols, and give at
least one example)
Flowchart vs. DFD vs. ERD
Systems can be modelled and designed using graphical tools such as
flowcharts, data flow diagrams (DFD), and entity relationship diagrams (ERD).
They employ distinct symbols to depict their elements, though, and serve
different goals.
1. Flowchart
A flowchart is a diagram that represents a process or workflow. It depicts
the sequence of steps or operations involved in a system, program, or
process. Flowcharts are commonly used for understanding, analyzing, and
documenting processes, providing a simple and visual way to map tasks and
decision points.
Common Flowchart Symbols:
1. Process (Action):
o Represented as a rectangle.
3. Start/End (Terminator):
o Represented as an oval or a pill shape.
4. Data Input/Output:
o Represented as a parallelogram.
6. Document:
o Represented as a rectangle with a wavy base.
Example of Flowchart:
This flowchart illustrates a simple online order processing system.
2. Data Flow Diagram (DFD)
A DFD focuses on representing how data flows through a system. It
illustrates the system’s processes, external entities, data stores, and how
data moves between them. DFDs help in understanding the data movement
and processing logic, but do not define the details of decision-making
processes as seen in flowcharts.
Common DFD Symbols:
1. Process:
o Represented as a circle or rounded rectangle.
2. Data Flow:
o Represented as an arrow.
3. Data Store:
o Represented as two parallel lines.
4. External Entity:
o Represented as a rectangle.
Example of DFD:
This DFD represents a hotel booking system, showing how customer data
flows through the process of booking a room.
2. Attribute:
o Represented as an oval connected to an entity.
3. Relationship:
o Represented as a diamond.