1.
Introduction & Architecture
of Information Systems
Role of Information Systems in Organizations
An Information System (IS) is a coordinated set of components that
collect, process, store, and distribute information to support
decision-making and control in an organization.
It helps in automation, improving efficiency, reducing human error,
supporting communication, and enabling data-based decisions.
Types of Information Systems
1.Transaction Processing System (TPS) – Handles day-to-day
transactions
Example: Railway booking system
2.Management Information System (MIS) – For routine decision
making
3.Decision Support System (DSS) – For complex, unstructured
decisions
4.Executive Support System (ESS) – For top-level summaries
2. Overview of Database
Management System (DBMS)
A DBMS is software that enables users to create, store, retrieve,
update, and manage data efficiently. Examples: MySQL, Oracle,
PostgreSQL, SQL Server.
Functions of DBMS
● Data storage & retrieval
● Backup & recovery
● Concurrency control
● Security & authorization
● Data independence
● Data integrity enforcement
3. Database System vs File
System
Feature File System Database System
Storage Separate Centralized
files database
Redundancy High Low
Security Weak Strong
Querying Manual SQL-based
Concurrency Difficult Controlled (ACID)
Backup Manual Automatic
Example
● File system: Each department maintains its own Excel sheet →
duplicates & inconsistency
● DBMS: Central database shared by all → no duplication
4. Characteristics of a Database
● Self-describing: Metadata stored in data dictionary
● Data abstraction (levels of data)
● Reduced data redundancy
● Data integrity (constraints)
● Concurrent access
● Security & authorization
● Backup & recovery support
5. Database System Concepts &
Architecture
A database system is composed of DBMS software, database, and users.
Three-Level Architecture (ANSI-SPARC Model)
1.External level (View level) – What users see
2.Conceptual level (Logical level) – Logical structure (tables,
relationships)
3.Internal level (Physical level) – How data is stored
internally
6. Data Independence
Data independence means changes at one level do not affect other
levels.
Types
● Logical Data Independence
Changing tables/relationships does not affect user views.
● Physical Data Independence
Changing storage method, indexing does not affect logical
schema.
Example:
Adding a new index on a table does not change SQL queries →
physical independence.
7. ER Model & ER Diagram Design
The Entity-Relationship model describes the logical structure of a
database using:
● Entities
● Attributes
● Relationships
Example ER Diagram
(College Database)
7.1 Entities
● Student
○ Attributes: RollNo, Name, Address
● Course
○ Attributes: CourseID, Name, Credits
7.2 Keys
● Primary Key → uniquely identifies entity
Example: RollNo in Student
● Composite Key → made of multiple attributes
7.3 Mapping Constraints
Types
● One-to-One (1:1)
● One-to-Many (1:M)
● Many-to-Many (M:N)
Example
● One department has many students → 1:M
● Students enroll in multiple courses → M:N
7.4 Relationships
● Weak relationship (dependent entity)
● Recursive relationship (same entity relates to itself)
Example: Employee supervises Employee.
8. Generalization and
Aggregation
8.1 Generalization
Combining lower-level entities into a higher-level entity.
Example:
Car, Bike → generalized into Vehicle
8.2 Aggregation
Used when a relationship is treated as an entity.
Example:
A Project assigned to an Employee → combined into a single
aggregated entity for another relationship.
9. ER-to-Relational Mapping
Step-by-step Example
ER Model: Student–Course (M:N) Enrollment
Mapping
1.Entity → Table
○ STUDENT(RollNo, Name, …)
○ COURSE(CourseID, Name, …)
2.M:N relationship → New table
ENROLLMENT(RollNo, CourseID, Grade)
○ RollNo → FK referencing STUDENT
○ CourseID → FK referencing COURSE
10. Relational Data Model
Concepts
The relational model stores data in tables (relations).
Terms
● Relation → Table
● Tuple → Row
● Attribute → Column
● Domain → Set of valid values
● Degree → No. of attributes
● Cardinality → No. of rows
11. Integrity Constraints
Constraint Meaning Example
Primary Key Uniquely identifies a RollNo
tuple
Foreign Key References another table CourseID in ENROLLMENT
Unique Attribute values must be Email
distinct
Not Null Cannot be empty Name
Check Condition must be Age >= 18
satisfied
12. Relational Algebra
Relational algebra is a formal query language used to manipulate
relations.
Basic Operations
1.Selection (σ) – row filtering
σ(age > 18)(STUDENT)
2.Projection (π) – column selection
π(Name, RollNo)(STUDENT)
3.Union (∪)
4.Set Difference (−)
5.Cartesian Product (×)
6.Rename (ρ)
Join Operations
● Theta Join
● Equi Join
● Natural Join
✅ Sample Database
We will use two relations:
STUDENT
RollNo Name Age Dept
101 Ali 20 CS
102 Rafiq 22 EE
103 Imran 19 CS
104 Sana 21 ME
COURSE
CourseID CourseName Dept
C1 DBMS CS
C2 Networks EE
C3 Thermo ME
ENROLLMENT
RollNo CourseID
101 C1
102 C2
103 C1
104 C3
⭐ 1. SELECTION (σ)
Select rows based on condition.
Example 1:
Find students of CS department.
Relational Algebra:
σ(Dept = 'CS')(STUDENT)
Result:
RollNo Name Age Dept
101 Ali 20 CS
103 Imran 19 CS
⭐ 2. PROJECTION (π)
Select specific columns.
Example 2:
List only Name and Dept of all students.
Relational Algebra:
π(Name, Dept)(STUDENT)
Result:
Name Dept
Ali CS
Rafiq EE
Imran CS
Sana ME
⭐ 3. UNION (R ∪ S)
Union only works if both relations have same schema.
Let:
A = π(RollNo)(σ(Dept='CS')(STUDENT))
B = π(RollNo)(σ(Age>20)(STUDENT))
A = {101, 103}
B = {102}
Example 3:
A ∪ B = {101, 102, 103}
⭐ 4. SET DIFFERENCE (R − S)
Example 4:
Find roll numbers of CS students who are not older than 20.
A = π(RollNo)(σ(Dept='CS')(STUDENT)) = {101, 103}
B = π(RollNo)(σ(Age>20)(STUDENT)) = {102, 104}
A − B = {101, 103}
(As expected, CS students are not in B.)
⭐ 5. CARTESIAN PRODUCT (×)
Example 5:
STUDENT × COURSE
(Shows all possible combinations)
Relational Algebra:
STUDENT × COURSE
Snippet of result:
RollNo Name Dept CourseID CourseName
101 Ali CS C1 DBMS
101 Ali CS C2 Networks
… … … … …
(Not used alone in databases; used before JOIN.)
⭐ 6. RENAME (ρ)
Example 6:
Rename STUDENT table to S.
ρ(S)(STUDENT)
Rename attribute:
ρ(NewRollNo/RollNo)(STUDENT)
⭐ 7. THETA JOIN (⋈θ)
Join with a condition.
Example 7:
Join STUDENT and COURSE on same department.
Relational Algebra:
STUDENT ⋈ ([Link] = [Link]) COURSE
Result:
Name Dept CourseName
Ali CS DBMS
Imran CS DBMS
Rafiq EE Networks
Sana ME Thermo
⭐ 8. EQUIJOIN
Theta join with “=”.
Example 8:
Join STUDENT and ENROLLMENT.
STUDENT ⋈ ([Link] = [Link]) ENROLLMENT
Result:
RollNo Name CourseID
101 Ali C1
102 Rafiq C2
103 Imran C1
104 Sana C3
⭐ 9. NATURAL JOIN (⋈)
Automatically joins on common attributes (RollNo).
Example 9:
STUDENT ⋈ ENROLLMENT
Result (same as equijoin without repeating RollNo):
RollNo Name Age Dept CourseID
101 Ali 20 CS C1
102 Rafiq 22 EE C2
103 Imran 19 CS C1
104 Sana 21 ME C3
⭐ 10. DIVISION (÷)
Used for “students who enrolled in all courses of a department”.
Example Dataset
Takes
RollNo CourseID
101 C1
101 C2
102 C1
103 C1
103 C2
Courses Required
CourseID
C1
C2
Query:
Find students who took all courses in the required list.
Relational Algebra:
Takes ÷ RequiredCourses
Result:
RollNo
101
103
(because only RollNo 101 and 103 took both C1 and C2)
⭐ 11. COMPLETE RELATIONAL
ALGEBRA QUERY
Query:
Find names of CS students enrolled in DBMS.
Step 1 – Select CS students:
σ(Dept='CS')(STUDENT)
Step 2 – Select DBMS course:
σ(CourseName='DBMS')(COURSE)
Step 3 – Join COURSE with ENROLLMENT:
COURSE ⋈ [Link] = [Link] ENROLLMENT
Step 4 – Join with STUDENT:
STUDENT ⋈ [Link] = [Link] (...)
Final Projection:
π(Name)(
(σ(Dept='CS')(STUDENT))
⋈
(σ(CourseName='DBMS')(COURSE) ⋈ ENROLLMENT)
)
Final Answer:
Name
Ali
Imran