Module4 Software Engineering and Databases
Module4 Software Engineering and Databases
Software Engineering
& Database Systems
Essentials of Information Technology (1BESC104E/204E)
Topics: Software Life Cycle • Methodologies • Modularity • UML • Database Fundamentals • Relational Model
• SQL
Module 4 — Topics at a Glance
During the 1960s and 1970s many software projects failed due to poor planning, cost overruns, unreliable software
and maintenance difficulties. This led to the birth of Software Engineering as a discipline.
7.1 — The Software Engineering Discipline
Key takeaway: Software engineering includes both technical AND management challenges — unlike traditional engineering.
7.2 — The Software Life Cycle
Identify what the system must Create a plan for how to build Actual coding, database creation
Verify the software meets
do. Produce a Software the system. Define internal and file development.
requirements. Check each step,
Requirements Specification structure, blueprints and Programmers convert design
not just the final product.
(SRS). Involves all stakeholders. architecture. into working programs.
7.2 — The Software Life Cycle
What should the library How will the software be Build the software through Check whether the
software do? built? coding. software works correctly.
Agile / XP Prototyping
• A working model (prototype) of the system is developed before creating
• Agile is an iterative development approach where software is the final software which is shown to users to gather feedback and clarify
developed in small increments with continuous customer feedback. requirements.
• Work is divided into short cycles called sprints, usually lasting 1–4 • Based on user suggestions, the prototype is refined until the final
weeks. requirements are understood.
• Advantage: Flexibility, rapid delivery, customer involvement and • Advantage: Prototype model helps in understanding and refining user
easier adaptation to changing requirements. requirements at an early stage.
• Disadvantage: Agile model requires active customer involvement • Disadvantage: Users may mistake the prototype for the final product,
throughout the development process. leading to unrealistic expectations.
• Ex: Food delivery apps frequently update features based on user • Ex: An online shopping website may first develop a prototype showing the
feedback, making Agile highly suitable. homepage, product catalog, and shopping cart to gather customer
feedback before full development.
7.3 — Software Engineering Methodologies
Waterfall Model Spiral Model
Agile / XP Prototyping
A Structure Chart shows FUNCTIONS (modules) and their dependencies (who calls who). It represents
• Hierarchy of modules
• Relationship among modules
• Flow of control between modules
Arrows in a structure chart = function calls. The top module controls all lower ones. This is the IMPERATIVE (procedural) paradigm approach.
Structure Chart — College management software example
Arrows in a structure chart = function calls. The top module controls all lower ones. This is the IMPERATIVE (procedural) paradigm approach.
7.4 — Modularity
Control coupling: function Logical cohesion: module Each module hides its
calls between modules does related tasks internal workings
7.4 — Modularity
Coupling is the degree of dependency Cohesion measures how closely related the Hide the internal working of a module and
between modules. functions inside a module are. expose only necessary functionality.
"If one module changes, will other modules be "Are all functions inside the module doing the “Is this information required to be shown
affected?" same kind of work?" here?"
Example: Whatsapp has chat module, calling module, Example: Amazon shopping cart module
Example: Amazon payment module.
status module, payment module.
Imagine the Shopping cart Module has Add Item,
When we buy a product, we only see ‘Buy now’ button,
Imagine the Chat Module directly depends on the Remove Item, Update Quantity, View Cart – High
‘Enter card details’ and ‘Payment successful’
Status Module. cohesion.
We should not see ‘Bank server communication’, ‘Fraud
If the Status Module crashes, chat may stop working Imagine the Shopping cart Module has Add Item,
detection code’, ‘Database transactions’.
and messages may not be delivered. Remove Item, Product Review, Customer Support,
Payment Processing – Low cohesion
High coupling – Bad software High cohesion – Good software A good software hides internal
Low coupling – Good software Low cohesion – Bad software implementation details
7.5 — Tools of trade
CASE Tools
Project Planning Tools
Project Management Tools
Documentation Tools
Prototyping Tools
Interface Design Tools
Programming Tools
IDEs
Unified Modelling Language (UML) is a graphical modelling language used to represent the structure and behavior of a
software system before it is actually developed.
UML (Unified Modelling Language) is a graphical modelling language. Using this, diagrams are drawn which help
developers understand the software before coding starts.
Software tools used to create UML are StarUML, Visual Paradigm, Lucidchart etc.
7.5 — Unified Modeling Language (UML)
Customer says:
"I want order tracking." Customer ----------------> Place Order
Miscommunication occurs.
7.5 — Unified Modeling Language (UML)
After 5 years:
│
Original developers leave. ┌──────────────────────────────┐
│ │ │
New developers join.
Chat Calling Status
No documentation exists. │
▼
Payment
Nobody understands the system structure.
7.5 — Unified Modeling Language (UML)
INSTAGRAM
• Need to add:
Reels Download Feature │
┌─────────────────────────────┐
│ │ │
Developers search through thousands of lines of Upload Photo Upload Reel Send Message
│
code.
▼
Difficult and time-consuming. Download Reel
7.5 — Unified Modeling Language (UML)
A diagram which is a
notational system
for representing the structure
of classes and relationships
between classes.
Classes are represented by
rectangles and associations
are represented by lines.
Class diagrams are commonly
used during the design phase
of software development.
7.5 — Unified Modeling Language (UML)
A database is an organized collection of related data that can be accessed, managed and
updated efficiently.
Why is it needed?
Example: College management software
College software has three parts let us say
• Accounts Department
• Examination Department
• Library Department
Without database
Rahul - Civil - Fee Paid Rahul - Civil - Marks Rahul - Civil - Books Issued
9.1 — Database Fundamentals
Why is it needed?
Example: College management software
If Rahul changes branch from Civil to Mechanical
Without database
Accounts Examination Library
With database
Reduce Redundancy Improve Consistency Enable Data Sharing Support Decision Making
A database ensures that all users A database allows multiple users and Databases help organizations generate
A database stores information in a
access the same updated information. departments to access the same data reports and analyze large amounts of
centralized location, avoiding
Any change made to the data is simultaneously. This improves data. These reports assist management
unnecessary duplication of data. This
reflected throughout the system, coordination and communication in making informed decisions.
reduces storage space and makes data
management easier. reducing errors and conflicts. within an organization.
Database system
Advantage
A Database System stores all related Song Database
information in a centralized database Now you can instantly search:
SongID | Song Name | Singer | Album | Year
that can be accessed by different
-----------------------------------------------------------------------
users and departments. 101 | Kesariya | Arijit | Brahmastra | 2022
• All songs by Arijit Singh
102 | Apna Bana Le | Arijit | Bhediya | 2022
103 | Heeriye | Arijit | Single | 2023 • Songs released in 2023
Ex: Consider Spotify. The songs are
not searched by opening thousands • Romantic songs
of music files one by one. Instead,
• Top-rated songs
Spotify maintains a database.
9.1 — Database Fundamentals
9.1 — Database Fundamentals