System design notes
System design notes
1. Process Modeling
Process modeling represents the workflows and data flows within a system. It helps in
understanding how data moves between processes, systems, and users.
A. Context Diagram
Explanation:
Example:
Explanation:
A DFD breaks down the system into smaller processes and shows:
Levels:
1. Level 0 (High-Level): Overview of the system and main processes.
2. Level 1 (Detailed): Breakdown of specific processes into sub-processes.
Example:
Level 0 DFD:
o Input: Borrower requests a book.
o Processes: Check book availability, issue the book, update borrower records.
o Output: Confirmation to the borrower.
Level 1 DFD for "Check Book Availability":
o Inputs: Book ID, Borrower ID.
o Processes: Query inventory, verify borrower eligibility.
o Outputs: Availability status.
2. Data Modeling
Data modeling defines the structure of the data the system will handle. It ensures data integrity,
reduces redundancy, and creates relationships between data entities.
Explanation:
An ERD represents:
Example:
Entities:
o Student (attributes: Student ID, Name, Email).
o Course (attributes: Course ID, Title, Credits).
o Enrollment (attributes: Enrollment ID, Date).
Relationships:
o A "Student" can enroll in multiple "Courses."
o A "Course" can have multiple "Students."
B. Creating and Validating ERD
Steps:
1. Identify Entities:
o List all significant objects in the system.
o Example: For an e-commerce site, entities could be "Customer," "Order,"
"Product," and "Payment."
2. Define Attributes:
o Add relevant details for each entity.
o Example: "Order" might include attributes like Order ID, Date, Total Amount.
3. Establish Relationships:
o Determine how entities interact.
o Example: A "Customer" places multiple "Orders," and each "Order" includes
multiple "Products."
4. Validate ERD:
o Ensure that relationships and attributes align with business rules.
o Example: Check cardinality, like one "Customer" can place many "Orders," but
each "Order" belongs to one "Customer."
System: Uber
External Entities:
o Customer: Requests rides, receives trip details.
o Driver: Receives ride requests, updates trip status.
o Payment Gateway: Processes payments, sends confirmation.
Data Flows:
o Trip requests, driver details, payment status updates.
System: PayPal
Level 0:
o Input: Payment details.
o Processes: Verify user, authorize payment, transfer funds.
o Output: Confirmation to sender and receiver.
Level 1 for "Authorize Payment":
o Sub-processes: Authenticate user, validate card details, check account balance.
3. ERD Example
System: Amazon
Entities:
o Customer (Customer ID, Name, Address).
o Order (Order ID, Order Date, Total Amount).
o Product (Product ID, Name, Price).
Relationships:
o A "Customer" places many "Orders."
o An "Order" contains many "Products."
o A "Product" can appear in many "Orders."
Example Library workflow for borrowing books University database of students and courses
UNIT -5 Design Phase
Explanation:
This phase transitions the abstract requirements into concrete designs, creating blueprints for the
system. It ensures that the system aligns with business needs and technical feasibility.
1. Requirements Analysis:
o Translate user requirements into technical specifications.
o Example: Uber analyzed user requirements for ride-hailing (e.g., booking, real-
time tracking) and translated them into technical modules like GPS integration,
payment systems, and driver allocation algorithms.
2. Design Documents:
o Create technical documents to serve as guidelines for development.
o Example: Airbnb creates design documents detailing APIs, user flows, and
database structures for new features like "Experiences."
2. System Acquisition
Explanation:
System acquisition involves deciding whether to build, buy, or customize software and hardware
components.
Design the system's overall structure, including hardware, software, and network components.
1. Architecture Design:
o Define the structure for system interaction.
o Example: Twitter’s architecture includes microservices to handle high traffic and
modular updates efficiently.
2. Hardware/Software Specifications:
o Specify hardware (servers, devices) and software (databases, frameworks)
requirements.
o Example: Zoom designed its architecture to include scalable cloud servers,
optimized video compression software, and secure protocols for meetings.
Explanation:
5. Input/Output Design
Explanation:
Design how the system captures data (input) and delivers results (output).
1. Input Design:
o Ensure accurate and efficient data entry.
o Example: Amazon’s "autocomplete" feature in the search bar helps users input
queries faster.
2. Output Design:
o Deliver data in a readable format.
o Example: Uber’s real-time map provides a visual output of driver locations and
estimated arrival times.
Explanation:
Logical models define what the system does, while physical models specify how it will do it.
7. Structure Chart
Explanation:
A structure chart visually represents the hierarchy of program modules, showing how they
interact.
1. Purpose:
o Breaks down the system into smaller, manageable modules.
o Example: For an e-commerce site:
Main Module: Manage Orders
Submodules: Process Payment, Track Inventory, Send Notifications.
Explanation:
Focus on designing data storage systems to ensure efficiency, scalability, and reliability.
1. Formats:
o Decide between files and databases for storing data.
o Example: Instagram uses databases for structured data like user profiles and
object storage for images and videos.
2. Logical to Physical Data Models:
o Logical Model: Abstract representation of entities and relationships.
o Physical Model: Includes specific tables, indexes, and storage locations.
o Example: A logical model for a library system may define entities like Books and
Users. The physical model specifies tables like books and users in MySQL with
attributes like ISBN and UserID.
3. Optimizing Storage:
o Minimize redundancy and improve retrieval speed.
o Example: Netflix optimizes storage by using a combination of relational databases
for metadata and distributed file systems for streaming content.
1. Requirements to Design:
o Requirements like "Find a nearby driver" were translated into GPS tracking and
route optimization modules.
2. System Acquisition:
o Uber acquired mapping services from Google and built its own algorithms for
dynamic pricing.
3. Architecture Design:
o Built a microservices architecture to handle different functionalities like user
management, trip requests, and payment processing.
4. UI and Navigation:
o Designed a simple interface with a map as the centerpiece, allowing users to book
rides intuitively.
5. Input/Output Design:
o Input: Users enter their pickup location.
o Output: Displays the driver’s location, estimated time of arrival, and fare estimate.
6. Program Design:
o Logical model: Defined workflows for booking and payment.
o Physical model: Integrated GPS data, pricing algorithms, and payment gateways.
7. Structure Chart:
o Top-level module: Manage Ride Requests.
o Submodules: Assign Driver, Calculate Fare, Process Payment.
8. Data Storage Design:
o Uber stores user data and ride history in relational databases, while real-time trip
data is handled through distributed systems like Apache Kafka.
UNIT – 6
Implementation & Testing Phase
The implementation and testing phase focuses on building, deploying, and validating the new
system. This phase ensures that the system meets functional, performance, and user requirements
while maintaining high quality and reliability.
Explanation:
1. Code Development:
o Write clean, efficient, and modular code to facilitate scalability and
maintainability.
o Example: Google follows stringent code review practices to ensure high-quality
contributions to its core projects like Google Maps.
2. Version Control:
o Use tools like Git to manage code changes and collaborate effectively.
o Example: The Linux kernel development relies heavily on Git for coordinating
thousands of contributors globally.
3. Continuous Integration and Continuous Deployment (CI/CD):
o Automate testing and deployment to streamline the process.
o Example: Netflix uses CI/CD pipelines to deploy updates to its streaming
platform multiple times a day without affecting users.
Explanation:
Documentation structure is a systematic way of organizing information to ensure easy access and
understanding.
1. Purpose of Documentation:
o Provides guidance for users, administrators, and developers.
oExample: Microsoft’s Azure portal includes detailed user guides, API references,
and troubleshooting manuals.
2. Organizing Content:
o Divide documentation into categories like user manuals, system design, and
troubleshooting guides.
o Example: Atlassian’s Confluence allows teams to maintain organized
documentation for software projects.
Explanation:
1. User Documentation:
o Guides end-users on how to use the system.
o Example: Apple provides a comprehensive user manual for macOS, detailing
features and troubleshooting steps.
2. System Documentation:
o Describes system architecture, design decisions, and code structure for
developers.
o Example: AWS includes whitepapers and design patterns for developers building
on their cloud platform.
3. Operational Documentation:
o Assists administrators in maintaining the system.
o Example: Oracle provides detailed installation, backup, and recovery guides for
its database systems.
4. Training Documentation:
o Used to train employees or users.
o Example: Salesforce offers training materials and certifications to help users
master its CRM tools.
Explanation:
Designing documentation terms involves creating a standardized glossary to ensure clarity and
consistency.
Glossaries:
o Define technical terms, acronyms, and jargon.
o Example: SAP documentation includes a glossary defining ERP-specific terms
like "ledger" or "BOM (Bill of Materials)."
Style Guides:
o Establish guidelines for formatting and language.
o Example: Microsoft’s Manual of Style standardizes documentation language
across all its products.
5. Testing Phase
Explanation:
Testing ensures that the system functions as expected and is free from critical bugs. This phase
involves various types of tests to validate functionality, performance, and user satisfaction.
Ensures the system's UI/UX flows are intuitive and work correctly.
Example: Amazon tests navigation paths like "Search for a product > Add to Cart >
Checkout" to ensure a seamless shopping experience.
B. System Tests
C. Acceptance Tests
Verify that the system meets user requirements and is ready for deployment.
Example: In ERP implementation, Nestlé conducted acceptance testing to ensure the
system aligned with their supply chain needs.
D. Test Planning
E. Unit Tests
Transitioning to a new system begins with creating a structured migration plan. This involves
assessing current limitations, defining new system requirements, and creating a roadmap.
Explanation:
Choosing the right strategy ensures minimal disruption and a smooth switchover.
Explanation:
1. Parallel Operation:
o The old and new systems run side by side.
o Example: Bank of America kept its legacy online banking system running
alongside its new mobile app to ensure smooth user migration.
2. Phased Implementation:
o Introduce the new system in stages.
o Example: Amazon Web Services (AWS) initially rolled out cloud storage to
developers, gradually expanding to enterprises.
3. Big Bang Approach:
o The new system replaces the old one overnight.
o Example: SAP implementation at Nestlé involved a complete switchover to
centralize global operations.
4. Pilot Testing:
o Test the system with a small group before full deployment.
o Example: Google Workspace was piloted with select organizations to gather
feedback and refine the tools.
A contingency plan ensures minimal impact from unexpected issues during the migration.
Explanation:
1. Risk Assessment:
o Identify potential risks like data loss or system downtime.
o Example: Facebook anticipated backlash during its Metaverse transition and
prepared communication protocols for crisis management.
2. Backup and Recovery Plans:
o Regularly back up data and test recovery mechanisms.
o Example: Google’s data centers implement geographically distributed backups for
disaster recovery.
3. Fallback Mechanisms:
o Keep the old system operational until the new one is stable.
o Example: During Microsoft’s move to Azure, critical applications were kept on-
premises as a fallback.
Infrastructure, data migration, and system integration are critical for success.
Example: When Walmart introduced RFID technology for inventory management, they:
o Upgraded hardware for tracking.
o Cleaned and validated data for integration.
o Conducted stress tests to ensure scalability.
5. Resistance to Change
Explanation:
1. Understanding Resistance:
o Resistance often stems from fear of the unknown, job insecurity, or perceived
inefficiencies.
o Example: Coca-Cola employees resisted the ERP system due to its complexity.
2. Overcoming Resistance:
o Communicate benefits, involve employees, and offer incentives.
o Example: Coca-Cola held workshops, appointed change champions, and rewarded
early adopters to encourage acceptance.
Explanation:
1. Policy Updates:
o Revise guidelines to integrate new workflows.
o Example: IBM updated its policies to support hybrid cloud adoption, enabling
seamless remote work.
2. Workflow Optimization:
o Redesign workflows to eliminate inefficiencies.
o Example: Nestlé redefined supply chain processes during its SAP implementation
to reduce redundancies.
Explanation:
1. Costs:
o Include hardware, software, training, and downtime.
o Example: Walmart invested in RFID technology but also incurred indirect costs
from staff training.
2. Benefits:
o Tangible and intangible advantages like efficiency and user satisfaction.
o Example: Walmart reduced stockouts by 16%, improving customer satisfaction
and achieving a fast ROI.
Explanation:
1. Incentives:
o Offer rewards or recognition to early adopters.
o Example: Adobe incentivized Creative Cloud subscriptions with discounted
introductory plans.
2. Continuous Learning:
o Provide resources like tutorials or community forums.
o Example: Adobe hosted webinars to showcase cloud collaboration benefits and
offered ongoing learning materials.
A. Security Considerations