SE Module1
SE Module1
Topics
✓ The Software Engineering Discipline
✓ The Software Life Cycle
✓ Software Engineering
✓ Methodologies
✓ Modularity
✓ Tools of the Trade
Software Engineering
Software engineering is the branch of computer science that seeks principles to guide the
development of large, complex software systems. The subject is named such because software
development is an engineering process.
The goal of software engineering researchers is to find principles that lead to efficient, reliable
software products. The problems encountered in large systems are more than just scaled-up
versions of small programming problems, as they involve:
1
BESC104E/204E - Essentials of Information Technology
Figure 7.1 The software life cycle: Illustrates the continuous cycle of software after its creation, consisting of
three primary phases: Development, Use, and Maintenance.
The major steps in the traditional software development life cycle are requirements analysis,
design, implementation, and testing.
2
BESC104E/204E - Essentials of Information Technology
Figure 7.2 The traditional development phase of the software life cycle: Shows the sequential flow of the
four major steps in the traditional, or waterfall, development process: Requirements Analysis -> Design ->
Implementation ->Testing.
Development Phases
Step2/Phase2-Design: Involves creating a plan for the construction of the proposed system; it
is about developing a solution (how to do it).
o A software analyst (or system analyst) is involved with the entire process,
especially analysis and design, while a programmer is primarily involved with
implementation (writing programs to implement the design).
3
BESC104E/204E - Essentials of Information Technology
Methodologies/Models:
1. Waterfall – Sequential and rigid.
2. Incremental – Build in parts.
3. Iterative – Refine through versions.
4. Prototyping – Evolutionary and Throwaway.
5. Agile & Open-Source Development
1. Waterfall Model
A linear, step-by-step approach where each phase must be completed before the next begins.
Key Features:
• Sequential flow: Requirements → Design → Implementation → Testing →
Deployment → Maintenance.
• No overlapping or returning to previous phases.
• Suitable when requirements are clearly defined and stable.
Advantages:
• Simple to understand and manage.
• Clear documentation and milestones.
Disadvantages:
• Inflexible to change.
• Errors found late in the process are expensive to fix.
4
BESC104E/204E - Essentials of Information Technology
2. Incremental Models
The system is developed and delivered in small, functional parts (increments). Each
increment adds more features until the full system is complete.
Key Features:
• Each increment passes through design, coding, and testing.
• Early versions deliver basic functionality, with improvements added later.
• Useful when the requirements are partially known.
Advantages:
• Early delivery of working software.
• Easier to manage risk and changes.
Disadvantages:
• Requires good planning for integration of increments.
• Architecture must support incremental development.
3. Incremental Model
The software is developed through repeated cycles (iterations), with each version being
improved based on feedback and testing.
Key Features:
• Focuses on refinement — each iteration improves the previous one.
• Requirements and solutions evolve with feedback.
• Encourages continuous improvement.
Advantages:
• Early detection of issues.
• Adaptable to changing requirements.
Disadvantages:
• Requires continuous customer involvement.
• Can be difficult to manage progress tracking.
4. Prototyping
5
BESC104E/204E - Essentials of Information Technology
Open-Source Development
This is a less used, incarnation of incremental and iterative ideas. An initial version is posted
online (e.g., the Linux operating system), and other users can download, modify, and enhance
the source code. These changes are reported back to the original author and incorporated into
an extended version, leading to rapid, community-driven evolution.
4.4 Modularity
6
BESC104E/204E - Essentials of Information Technology
Modularity is the division of software into manageable units, or modules, each of which deals
with only a part of the software’s overall responsibility.
Modular Implementation
• Imperative Paradigm: Modules appear as functions. Design focuses on representing
the overall task as individual, manageable processes. Refer: Figure 7.3 – Which
Represents the modular structure in the imperative paradigm. Functions are
rectangles, and arrows indicate function dependencies (function calls/control coupling).
It shows ControlGame calling Serve, Return, ComputePath, and UpdateScore.
7
BESC104E/204E - Essentials of Information Technology
Coupling
• Definition: The linkage between modules (intermodule coupling).
• Goal: To minimize coupling to maximize independence among modules. This ensures
changes in one module are less likely to affect others.
• Control Coupling: A form of coupling that occurs when one module passes control of
execution to another, as in a function call.
Cohesion
• Definition: The internal binding, or the degree of relatedness of a module’s internal
parts (intramodule cohesion).
• Goal: To maximize cohesion. High cohesion ensures that if a change is needed, all the
necessary modifications are likely contained within that single module.
• Logical Cohesion: A weak form where internal elements perform activities that are
logically similar (e.g., all functions within a communication module). Entire objects in
OOP are typically only logically cohesive.
• Functional Cohesion: A stronger form where all parts of the module are focused on
the performance of a single activity. Software designers strive to make individual
methods within an object functionally cohesive. Refer: Figure 7.7 – Which Shows a
single Object containing multiple methods (Perform action A, B, C). The object as a whole
is described as only logically cohesive, but each individual method within it is to be
functionally cohesive.
8
BESC104E/204E - Essentials of Information Technology
Information Hiding
• Definition: The restriction of information (including data, data structures, and
internal composition) to a specific portion of a software system.
• Goal: To prevent modules from having unnecessary dependencies on or effects on
other modules, protecting against corrupted data or future malfunctions if internal
structure is altered.
• It is the concept of treating a module as a "black box" (abstraction). It is achieved by
design goals (maximizing cohesion, minimizing coupling) and implementation goals
(using local variables, encapsulation).
Components
• Definition: A reusable unit of software; an object is a special case of a component.
Most are a collection of one or more objects that function as a self-contained unit.
• Component Architecture (Component-Based Software Engineering): A field where a
component assembler constructs systems from prefabricated components (often
displayed as icons) by connecting and minimally customizing them.
Data Dictionary: A central repository of information about the data items used throughout a
software system. Includes the item's identifier, valid entries (e.g., data type, range of values),
storage location (file/database), and references (which modules use it). To establish uniformity
and reveal redundancies or contradictions in terminology across the system.
• Use Case Diagram: Depicts the proposed system from the user's point of view.
9
BESC104E/204E - Essentials of Information Technology
o Notation: The system is a large rectangle. Interactions (use cases) are ovals.
Users (actors) are stick figures.
o Figure 7.9 - indicates that the proposed Hospital Records System will be used
by both Physicians and Nurses to Retrieve Medical Records.
• Class Diagram: A notational system for representing the structure of classes and the
relationships (associations) between them.
o Notation: Classes are rectangles, and associations are lines. Arrowheads can
be used to indicate the reading direction of a label (e.g., cares for).
o Multiplicity: Used to indicate how many instances of one class may be
associated with another, recorded at the ends of association lines (e.g., 1, 0..1, or
* for an arbitrary nonnegative number).
o Figure 7.10 - shows how the relationships among these classes could be
represented in a UML class diagram. Classes are represented by rectangles and
associations are represented by lines. Association lines may or may not be
labeled. If they are labeled, a bold arrowhead can be used to indicate the
direction in which the label should be read.
The associations (relationships) between classes, often shown on a Class Diagram (Figure
7.10), occur in three basic forms:
• One-to-One: Each instance of one class is associated with only one instance of the
other, and vice versa (e.g., a patient and an occupied private room).
• One-to-Many: One instance of a class can be associated with many instances of the
second, but each instance of the second is associated with only one of the first (e.g., one
primary physician to many patients).
• Many-to-Many: Instances of both classes can be associated with many instances of
the other (e.g., patients and consulting physicians).
10
BESC104E/204E - Essentials of Information Technology
Figure 7.11 - Summarizes the basic forms of association multiplicities in class diagrams: one-
to-one, one-to-many, and many-to-many relationships.
Figure 4.12 - A generalization relationship: Depicts the generalization among the classes
MedicalRecord, SurgicalRecord, and OfficeVisitRecord. MedicalRecord is the general class, and the
specific classes (SurgicalRecord and OfficeVisitRecord) inherit its features while adding specialized
attributes/methods (e.g., SurgicalRecord adds surgical procedure).
11
BESC104E/204E - Essentials of Information Technology
Figure 7.13 - A formal sequence diagram: Depicts a general volley in the tennis game design,
showing the communication between player objects and the Judge object. It demonstrates the
formal syntax, including the frame, lifelines, and interaction fragments (loop and alt) to
represent complex, indefinite processes
The methodology involves software designers producing a card for each proposed object and
then using the cards to simulate the system's execution—a process known as a structured
walkthrough. This simulation is crucial for validating object-oriented designs and
identifying flaws before implementation.
12
BESC104E/204E - Essentials of Information Technology
Design Patterns
• Goal: To find high-quality solutions that provide flexibility later in the software life
cycle by adhering to good design principles (minimizing coupling and maximizing
cohesion).
• Examples:
o Adapter Pattern: A standard approach for "wrapping" a prefabricated
module inside another module to translate an incompatible interface, allowing
the original module to be used.
o Decorator Pattern: A standardized way to design systems that perform
different combinations of the same activities without creating overly complex
software.
• Impact: Design patterns have been incorporated into modern software development
toolkits (like Java and .NET frameworks) as templates, providing ready-made, high-
quality solutions to common design problems.
• Origin: The concept was inspired by the work of Christopher Alexander in traditional
architecture.
13
BESC104E/204E - Essentials of Information Technology
Topics
✓ Database Fundamentals
✓ The Relational Model.
• Integration and Efficiency: Historically, applications used separate files (e.g., payroll
file, inventory file), which led to significant data duplication and separate but related
items being stored apart. Database systems resolve this by integrating information into
a single pool.
• Versatile Use: The same integrated data can be used for multiple applications
simultaneously, such as generating restocking orders, creating reports on market trends,
directing advertisements, and generating sales force bonus checks.
• Strategic Management Tool: Database technology, often combined with data mining
techniques, allows management to extract valuable, pertinent information from
enormous amounts of data for decision-making.
• Web Foundation: Databases are the underlying technology for many popular World
Wide Web sites (like Google, eBay, and Amazon), where the server interrogates a
database to organize results into a Web page for the client. In some cases, the database
becomes the company's core product.
14
BESC104E/204E - Essentials of Information Technology
• Access Control: The ability to control access to information is vital to prevent sensitive
data from being seen by unauthorized personnel (e.g., a website customer vs. an
employee in the financial department).
• Schema (Entire Database): A description of the entire database structure used by
the database software to maintain the database. It details all data items and their logical
linkages (e.g., student record linked to faculty adviser record).
• Subschema (User View): A description of only that portion of the database pertinent
to a particular user's needs. For instance, a registrar's subschema might exclude a faculty
member's employment history, while the payroll department's subschema would
include it but exclude student-adviser linkages.
• Conceptual Layers: Database applications have two major software layers: the
application software (handles communication with the user) and the DBMS (performs
the actual database manipulation, searches, and alterations).
• Benefits of Separation:
o Abstraction: The DBMS acts as an abstract tool, isolating the application
software from the complexities of actual data storage (e.g., whether the database
is centralized or a distributed database across a network).
o Access Enforcement: By dictating that the DBMS performs all access, the
DBMS can enforce the restrictions imposed by the various subschemas.
o Data Independence: This is the ability to change the organization of the
database itself (like adding a new field to an employee record) without requiring
changes to the application software of users whose subschemas remain
unaltered.
4. Database Models
A database model is a conceptual framework that defines how data is logically structured,
stored, and accessed within a database system. It uses abstraction to hide the complexities of
physical data storage, presenting users with an organized and meaningful view of information.
The relational model represents data in tables with rows and columns, while the object-
oriented model stores data as objects that combine both data and behavior. The DBMS
provides routines that translate user commands into actions on the actual stored data, allowing
applications written in general-purpose programming languages to easily interact with the
database. Continuous advancements in database models aim to simplify complex data
representation, make querying more intuitive, and improve the overall efficiency of data
management systems.
15
BESC104E/204E - Essentials of Information Technology
16
BESC104E/204E - Essentials of Information Technology
• Deletion Anomaly (Loss of Data): Deleting a tuple (e.g., an employee leaving the
company) can cause the unintentional loss of information about a related concept (e.g.,
details about a job if that employee was the only holder of it).
• Solution via Decomposition: The solution is to separate the concepts into different
relations (e.g., EMPLOYEE, JOB, and ASSIGNMENT).
o Information can still be implicitly obtained by combining data from different
relations (e.g., finding an employee's department by linking ASSIGNMENT to JOB
via Job Id).
• Lossless Decomposition: A successful decomposition is a lossless decomposition,
meaning no information is lost by dividing the relation, and the original information
can be fully recovered by combining the new relations.
Relational Operations
The DBMS provides routines to perform these three core operations, which form the basis for
data manipulation in the relational model:
• SELECT (Tuples/Rows): Extracts a new relation consisting of the tuples (rows) from
the parent relation that possess certain specified characteristics.
o Syntax: NEW ← SELECT from EMPLOYEE where EmplId = '34Y70'.
• PROJECT (Attributes/Columns): Extracts a new relation containing only the
specified attributes (columns) from an existing relation. Duplicate rows are typically
removed.
o Syntax: MAIL ← PROJECT Name, Address from EMPLOYEE.
• JOIN (Combining Relations): Combines two different relations into a single new
relation. Tuples from the original relations are concatenated to form the new tuples, but
only if they satisfy a specified condition (e.g., equality between designated attributes).
o Syntax: NEW1 ← JOIN ASSIGNMENT and JOB where [Link] =
[Link].
These challenges occur because the relation mixes multiple concepts—employee details, job
information, and job assignments—into one table.
To resolve these issues, the database should be redesigned into separate relations: an
EMPLOYEE relation for personal details, a JOB relation for job descriptions, and an
ASSIGNMENT relation to link employees to their jobs. This approach eliminates redundancy,
prevents data loss, and improves database efficiency and integrity. This is shown in Figure 9.5
17
BESC104E/204E - Essentials of Information Technology
Figure 9.6: Finding the Departments in Which Employee 23Y34 Has Worked. This diagram
illustrates the retrieval process when data is decentralized (as in Figure 9.5), effectively
demonstrating the conceptual use of the JOIN operation.
1. Search the ASSIGNMENT relation for Empl Id 23Y34 to find their Job Ids (S25X
and S26Z).
2. Search the JOB relation using those Job Ids.
3. The result is the corresponding departments: Personnel and Accounting.
18
BESC104E/204E - Essentials of Information Technology
Dividing data into multiple tables in a database is not always simple and may sometimes cause
loss of information. For example, if employee details like ID, job title, and department are
split into separate tables, it can become unclear which department an employee belongs to.
When the division keeps all information intact, it is called lossless decomposition; when some
information is lost, it is lossy decomposition. Hence, database designers must be careful to
divide tables properly to avoid data loss and ensure the design remains efficient and accurate.
Relational operations are used to extract and manipulate data stored in tables (relations) in a
database. These operations help retrieve specific information based on certain conditions. For
example, to find details of a particular employee, we select the tuple (row) with the matching
employee ID from the EMPLOYEE table. Similarly, to list all job titles in a specific
department, we select tuples from the JOB table where the department matches the given name.
The result of such a selection is a new relation that contains only the tuples satisfying the given
condition.
The operation helps in filtering data, making it easier to view and analyze only the required
information.
The SELECT and PROJECT operations are two fundamental relational operations used to
retrieve specific data from a database.
SELECT Operation: Used to extract specific rows (tuples) from a table based on a given
condition.
• Example: NEW ← SELECT from EMPLOYEE where EmplId = '34Y70' (Figure 9.8).
• It filters data and creates a new relation with only the matching records.
19
BESC104E/204E - Essentials of Information Technology
20
BESC104E/204E - Essentials of Information Technology
In a JOIN operation, a new relation is created by combining (concatenating) tuples from two
existing relations based on a specified condition. The tuples that are joined depend on whether
certain attributes in both relations have the same value.
a tuple from relation A is combined with a tuple from relation B only when the value of attribute
W in A matches the value of attribute X in B. Hence, the tuple (r, 2) from A joins with (2, m,
q) from B because the values of W and X are equal. However, (r, 2) from A and (5, g, p) from
B are not joined since their attribute values do not match.
It allows users to interact with a DBMS (Database Management System) without worrying
about the details of data storage.
SQL is used to retrieve, insert, update, and delete data from databases.
Although SQL statements look imperative, they are actually declarative—users describe what
data they want, not how to get it.
SQL is standardized by ANSI and widely supported by systems like MySQL, Oracle, and
PostgreSQL.
Components:
21
BESC104E/204E - Essentials of Information Technology
For example, consider a query that retrieves all employee IDs and their corresponding
departments. Instead of performing three separate relational operations (JOIN, SELECT, and
PROJECT), this can be written in SQL as:
Examples:
UPDATE Employee
SET Address = 'New Address'
WHERE Name = 'Joe E. Baker';
→ Updates the address of the employee Joe E. Baker in the Employee table.
22