Unit 5 System Design
Unit 5 System Design
7. Reliability and Fault Tolerance: Designing the system to be resilient in the face of failures,
ensuring that it can continue to function properly even when certain components or
services fail.
8. Deployment and Infrastructure: Defining how the system will be deployed on various
environments (development, testing, and production) and determining the required
infrastructure, such as servers, networking, and cloud services.
9. User Experience (UX): Considering how users will interact with the system, including
designing intuitive interfaces and workflows that provide a positive user experience.
10. Maintainability and Extensibility: Creating a design that allows for easy maintenance,
updates, and future enhancements without major disruptions to the system.
System design often involves collaboration among software architects, engineers, product
managers, and other stakeholders.
Components of System Design
Below are some of the major components of the System Design. Discussed in brief. The detailed
version of this will be discussed in different posts:
1. Load balancers: Most crucial component for scalability, availability, and performance
measures for systems.
2. Key Value Stores: It is a storage system similar to hash tables where key-value stores are
distributed hash tables.
3. Blob Storage: Blob stands for binary large objects, as the name suggests is storage for
unstructured data such as YouTube, and Netflix.
4. Databases: It is an organized collection of data so that they can be easily accessed and
modified.
5. Rate Limiters: These sets the maximum number of requests a service can fulfill.
6. Monitoring System: These are basically software where system administrator monitor
infrastructures such as bandwidth, CPU, routers, switches, etc.
7. Distributed Unique ID generator: In the case of large distributed systems, every moment
multiple tasks are occurring so in order to distinguish it assign a tag corresponding to
every event.
8. Distributed Search: Over every website, crucial information that visitors will seek is put
into the search bar.
9. Distributed Logging Services: Tracing sequences of events from end to end.
10. Distributed Task Scheduler: Computational resources such as CPU, memory, storage, etc.
BIT III: PU Compiled By: GIRIJA 3
In Unit 1, we have already familiarized ourselves with the objectives of system design.
Architectural Design: The architectural design phase shapes the high-level structure of the
software. Here, designers determine the major components, their relationships, and the overall
flow of information. This stage lays the groundwork for the subsequent design steps.
Component Design: The component design phase adds depth to the narrative. Designers delve
into the specifics of each module, determining how they function and interact. This involves
defining interfaces, algorithms, and internal mechanisms that contribute to the overall narrative
of the software.
Database Design: The database design phase sculpts the data storage and retrieval mechanisms.
Designers create a blueprint for organizing data, defining tables, relationships, and access
methods. This step ensures that data is managed efficiently and can be accessed when needed.
User Interface Design: Designers craft user interfaces that are visually appealing and user-
friendly. They create layouts, select fonts, and design interactive elements that enhance the user
experience.
Integration and Testing: The integration and testing phase brings all the components together.
System designers integrate different modules, test their interactions, and identify and rectify any
issues. This step ensures that the entire system functions seamlessly as a unified entity.
Best Practices for Effective System Design
Thoroughly understand user needs and requirements before diving into design.
Create modular components to enhance reusability and maintainability.
Maintain comprehensive documentation to aid understanding and future development.
Develop prototypes to validate design concepts and gather user feedback.
Keep It Simple. Strive for simplicity in design to reduce complexity and improve system
clarity.
While preparing the logical design of a system, the system analyst specifies the user needs at
level of detail that virtually determines the information flow into and out of the system and the
required data sources. Data flow diagram, E-R diagram modelling are used.
BIT III: PU Compiled By: GIRIJA 5
Key components:
Data entities: Representing real-world objects (e.g., users, products, orders) with relevant
attributes.
Relationships: Defining how entities connect and interact (e.g., users place orders, orders
contain products).
Workflows: Outlining the sequences of actions and data flow within the system (e.g., user
login, product search, checkout process).
Use cases: Describing different ways users interact with the system and their goals.
Physical Design
Physical design relates to the actual input and output processes of the system. It focuses on
how data is entered into a system, verified, processed, and displayed as output.
It produces the working system by defining the design specification that specifies exactly what
the candidate system does. It is concerned with user interface design, process design, and data
design.
It consists of the following steps −
BIT III: PU Compiled By: GIRIJA 6
Specifying the input/output media, designing the database, and specifying backup
procedures.
Planning system implementation.
Devising a test and implementation plan, and specifying any new hardware and
software.
Updating costs, benefits, conversion dates, and system constraints.
Key components:
Database design: Choosing the appropriate database type (e.g., relational, NoSQL) and
defining table structures based on data needs and access patterns.
System architecture: Selecting the overall infrastructure setup (e.g., cloud, distributed
systems) based on scalability and performance requirements.
Technology stack: Choosing specific technologies for development (e.g., programming
languages, frameworks) and communication protocols.
Performance optimization: Implementing techniques to optimize resource usage,
minimize data redundancy, and ensure efficient data access.
Key Principles:
Benefits:
Challenges:
Complexity: Defining clear interfaces and managing interactions between modules can be
complex.
Overhead: Additional communication overhead might be introduced due to inter-module
communication.
Standardization: Defining and maintaining standardized interfaces across diverse
modules requires careful planning.
Potential Incompatibility: Compatibility issues might arise when adding or replacing
modules from different sources.
Examples:
Software: Micro services architecture, object-oriented programming, plugins.
Hardware: Legos, computers (CPU, RAM, GPU), furniture sets.
Other: Curriculum with interchangeable modules, standardized shipping containers
Functional strength in structural design refers to the ability of a structure to withstand loads and
perform its intended function without failure. It involves designing a structure to meet both the
functional requirements and the necessary strength and stability criteria.
Some key considerations for achieving functional strength in structural design:
Load Analysis:
Understand and analyze the types and magnitudes of loads that the structure will experience,
including dead loads (permanent/static loads), live loads (temporary/dynamic loads), and
environmental loads (wind, earthquake, etc.).
Consider the effects of both normal operating conditions and potential extreme events.
BIT III: PU Compiled By: GIRIJA 11
Material Selection:
Choose materials with appropriate strength properties for the intended use of the structure.
Consider factors such as tensile strength, compressive strength, shear strength, and other
relevant material properties.
Safety Factors:
Apply appropriate safety factors to account for uncertainties and variations in material
properties, construction processes, and loading conditions. Safety factors ensure that the
structure has a margin of safety against failure.
Structural Analysis:
Perform structural analysis using engineering principles and tools to determine how the structure
will respond to various loads. Ensure that the structure remains within acceptable limits for
deflection, stress, and stability.
Connection Design:
Design connections between structural elements to ensure proper load transfer and distribution.
Pay attention to details such as welds, bolts, and other fasteners to prevent localized failures.
Code Compliance:
Adhere to relevant building codes and standards that provide guidelines for ensuring structural
safety and integrity. Codes often include specifications for material properties, design
methodologies, and safety factors.
Lifecycle Considerations:
Account for factors such as maintenance, deterioration, and potential modifications over the
structure's lifecycle. Design for durability and long-term performance.
Interdisciplinary Collaboration:
Work collaboratively with other disciplines, such as architects and mechanical engineers, to
ensure that the structural design aligns with overall project goals.
Structured Chart
A structured chart, also known as a De Marco chart, is a graphical tool used in software
engineering to visualize the hierarchical decomposition of a program or system into functional
modules. It depicts the relationships between modules, highlighting how they interact and
exchange data.
Structure Chart represents the hierarchical structure of modules. It breaks down the entire
system into the lowest functional modules and describes the functions and sub-functions of each
module of a system in greater detail.
In Structured Chart:
Inputs are given to the black boxes and appropriate outputs are generated.
Modules at the top level are called modules at low level.
Components are read from top to bottom and left to right.
When a module calls another, it views the called module as a black box, passing the
required parameters and receiving results.
2. Conditional Call
It represents that control module can select any of the sub module on the basis of some
condition.
4. Data Flow
It represents the flow of data between the modules. It is represented by a directed arrow with
an empty circle at the end.
5. Control Flow
It represents the flow of control between the modules. It is represented by a directed arrow
with a filled circle at the end.
6. Physical Storage
It is that where all the information are to be stored.
BIT III: PU Compiled By: GIRIJA 15
Example
Structure chart for an Email server
Types of Cohesion:
Content Coupling:
Modules share data directly through global variables or parameters. This is the strongest coupling
method and is not recommended because it tightly couples the modules and makes them highly
dependent on each other.
General Coupling:
Modules share global data or resources that are frequently used and modified by different
modules. Although not as direct as pooling content, it still represents tight pooling through
shared resources.
External Coupling:
Modules communicate by exchanging data through external interfaces such as function
parameters or method calls. Although external binding is more flexible than content and general
binding, it can still cause dependencies.
Control Coupling:
One module affects the behavior of another by passing control information, often through
parameters. This type of connection may be less direct than a content connection but still
requires close communication.
Stamp Coupling:
Modules share a composite data structure such as a record or object without sharing. Changes
to the structure can affect several modules, but the connection is weaker than in the content
connection.
Data Coupling:
Modules share data through parameters, but there is no direct relationship between functions.
Compared to the previous types, it is a relatively loose form of connection.
BIT III: PU Compiled By: GIRIJA 17
Cohesion
Cohesion in software engineering refers to the degree of interrelatedness and focus among the
elements within a module, class, or component. It measures how well the internal components
of a module work together to achieve a single, well-defined purpose.
Types of Cohesion:
Functional Cohesion:
Elements within a module are grouped based on a single, specific functionality or task. This is the
strongest form of cohesion, where all elements contribute to the same goal.
Sequential Cohesion:
Elements are organized in a linear sequence, where the output of one element becomes the input
of the next. This type of cohesion is often seen in processes with step-by-step execution.
Communicational Cohesion:
Elements within a module work together to manipulate a shared data structure. They might not
perform the same function, but their actions are closely related to a common piece of data.
Procedural Cohesion:
Elements are grouped based on their involvement in a specific sequence of actions or steps.
They might share some data, but their primary focus is on the sequence of operations.
BIT III: PU Compiled By: GIRIJA 18
Temporal Cohesion:
Elements are grouped because they need to be executed at the same time or during the same
phase. They might not share functional or data-related aspects.
Coincidental Cohesion:
Elements are grouped arbitrarily without a clear, meaningful relationship. This type of cohesion
is typically indicative of poor module design.
Advantages of Low Coupling
Easier adaptability to new requirements.
Clear module boundaries for focused development.
Team members work independently with reduced conflicts.
Modules can be tested in isolation, improving reliability.
Easier debugging and refactoring, enhancing code quality.
Supports seamless expansion and addition of features.
Facilitates effective communication and teamwork.
Increasing cohesion is good for software. Increasing coupling is avoided for software.
Highly cohesive gives the best software. Whereas loosely coupling gives the best
software.
In cohesion, the module focuses on a single In coupling, modules are connected to the
thing. other modules.
Cohesion is created between the same Coupling is created between two different
module. modules.
Database designs provide the blueprints of how the data is going to be stored in a system.
The proper design of a database highly affects the overall performance of any application.
The designing principles defined for a database give a clear idea of the behavior of any
application and how the requests are processed.
Another instance to emphasize the database design is that a proper database design
meets all the requirements of users.
Lastly, the processing time of an application is greatly reduced if the constraints of
designing a highly efficient database are properly implemented.
BIT III: PU Compiled By: GIRIJA 20
Although, the life cycle of a database is not an important discussion that has to be taken forward
in this article because we are focused on the database design. But, before jumping directly on the
designing models constituting database design it is important to understand the overall workflow
and life-cycle of the database.
Requirement Analysis
First of all, the planning has to be done on what are the basic requirements of the project under
which the design of the database has to be taken forward. Thus, they can be defined as:-
Planning - This stage is concerned with planning the entire DDLC (Database Development Life
Cycle). The strategic considerations are taken into account before proceeding.
System definition - This stage covers the boundaries and scopes of the proper database after
planning.
Database Designing
The next step involves designing the database considering the user-based requirements and
splitting them out into various models so that load or heavy dependencies on a single aspect are
not imposed. Therefore, there has been some model-centric approach and that's where logical
and physical models play a crucial role.
Physical Model - The physical model is concerned with the practices and implementations of the
logical model.
Logical Model - This stage is primarily concerned with developing a model based on the proposed
requirements. The entire model is designed on paper without any implementation or adopting
DBMS considerations.
BIT III: PU Compiled By: GIRIJA 21
Implementation
The last step covers the implementation methods and checking out the behavior that matches
our requirements. It is ensured with continuous integration testing of the database with different
data sets and conversion of data into machine understandable language.
Data conversion and loading - This section is used to import and convert data from the old to the
new system.
Testing - This stage is concerned with error identification in the newly implemented system.
Testing is a crucial step because it checks the database directly and compares the requirement
specifications.
File Organization
The File is a collection of records. Using the primary key, we can access the records. The
type and frequency of access can be determined by the type of file organization which
was used for a given set of records.
File organization is a logical relationship among various records. This method defines how
file records are mapped onto disk blocks.
File organization is used to describe the way in which the records are stored in terms of
blocks, and the blocks are placed on the storage medium.
The first approach to map the database to the file is to use the several files and store only
one fixed length record in any given file. An alternative approach is to structure our files
so that we can contain multiple lengths for records.
Files of fixed length records are easier to implement than the files of variable length
records.
BIT III: PU Compiled By: GIRIJA 24
B+ File Organization
The advanced way of an indexed sequential access mechanism is the B+ tree file organization. In
File, records are stored in a tree-like structure.
F. Introduction to Normalization
Normalization is the process of organizing the data in the database.
Normalization is used to minimize the redundancy from a relation or set of relations. It is
also used to eliminate undesirable characteristics like Insertion, Update, and Deletion
Anomalies.
Normalization divides the larger table into smaller and links them using relationships.
The normal form is used to reduce redundancy from the database table.
Benefits of Normalization:
Eliminates Redundancy: Reduces data duplication by organizing data in a systematic
manner.
Consistent Data: Ensures consistency and uniformity in data, reducing anomalies and
errors.
Improved Query Performance: Enhances query performance by simplifying data
retrieval and analysis.
Easier Maintenance: Facilitates easier database maintenance and updates.
Better Data Integrity: Minimizes data anomalies and improves overall data integrity.
Facilitates Flexibility: Allows for more flexible database design and adaptability to
changes.
Supports Multilevel Access: Supports various levels of data access control.
Normal Forms
There are four types of normal forms that are usually used in relational databases as you can
see in the following figure:
BIT III: PU Compiled By: GIRIJA 27
It should serve specific purpose effectively such as storing, recording, and retrieving the
information.
It ensures proper completion with accuracy.
It should be easy to fill and straightforward.
It should focus on user’s attention, consistency, and simplicity.
All these objectives are obtained using the knowledge of basic design principles
regarding −
What are the inputs needed for the system?
How end users respond to different elements of forms and screens.
To design input data records, data entry screens, user interface screens, etc.
To use validation checks and develop effective input controls.
Audit trails for data entry and other system operations are created using transaction logs which
gives a record of all changes introduced in the database to provide security and means of
recovery in case of any failure.
Output Design
The design of output is the most important task of any system. During output design,
developers identify the type of outputs needed, and consider the necessary output controls and
prototype report layouts.
Objectives of Output Design
The objectives of input design are −
To develop output design that serves the intended purpose and eliminates the
production of unwanted output.
To develop the output design that meets the end users requirements.
BIT III: PU Compiled By: GIRIJA 30
External Outputs
Manufacturers create and design external outputs for printers. External outputs enable the
system to leave the trigger actions on the part of their recipients or confirm actions to their
recipients.
Some of the external outputs are designed as turnaround outputs, which are implemented as a
form and re-enter the system as an input.
Internal outputs
Internal outputs are present inside the system, and used by end-users and managers. They
support the management in decision making and reporting.
There are three types of reports produced by management information −
Detailed Reports − They contain present information which has almost no filtering
or restriction generated to assist management planning and control.
Summary Reports − They contain trends and potential problems which are
categorized and summarized that are generated for managers who do not want
details.
Exception Reports − They contain exceptions, filtered data to some condition or
standard before presenting it to the manager, as information.
Forms Design
Both forms and reports are the product of input and output design and are business document
consisting of specified data. The main difference is that forms provide fields for data input but
reports are purely used for reading. For example, order forms, employment and credit
application, etc.
To keep the screen simple by giving proper sequence, information, and clear captions.
To meet the intended purpose by using appropriate forms.
To ensure the completion of form with accuracy.
To keep the forms attractive by using icons, inverse video, or blinking cursors etc.
To facilitate navigation.