DBMS Module 1
DBMS Module 1
SYSTEMS
CSE304
COURSE INTRODUCTION
Semester: III, Session :Jul-Dec 2025
Faculty:
Dr. Vikrant Chole
Department of Computer Science and Engineering
Amity School of Engineering and Technology
Amity University Madhya Pradesh
University: Vision and Mission
2
Mission and Vision of the Department
Vision of the Department
To empower the next generation of computer
professionals with the skills and knowledge to drive
technological progress and societal development through
excellence in education, research, and innovation.
4
Bloom’s Taxonomy
Department of CSE 5
Program Outcomes for Engineering
PO1: Engineering knowledge: Apply the knowledge of mathematics, science, engineering fundamentals, and an engineering specialization to the
1
solution of complex engineering problems.
PO2: Problem analysis: Identify, formulate, review research literature, and analyze complex engineering problems reaching substantiated conclusions
2
using first principles of mathematics, natural sciences, and engineering sciences.
PO3: Design/development of solutions: Design solutions for complex engineering problems and design system components or processes that meet the
3
specified needs with appropriate consideration for the public health and safety, and the cultural, societal, and environmental considerations.
PO4: Conduct investigations of complex problems: Use research-based knowledge and research methods including design of experiments, analysis
4
and interpretation of data, and synthesis of the information to provide valid conclusions.
PO5: Modern tool usage: Create, select, and apply appropriate techniques, resources, and modern engineering and IT tools including prediction and
5
modeling to complex engineering activities with an understanding of the limitations.
PO6: The Engineer and the World: Assess societal, environmental, economic, health, safety, legal, cultural aspects of engineering solutions and their
6
impacts on sustainability.
7 PO7: Ethics: Apply ethical principles and commit to professional ethics and responsibilities and norms of the engineering practice.
8 PO8: Individual and team work: Function effectively as an individual, and as a member or leader in diverse teams, and in multidisciplinary settings.
PO9: Communication: Communicate effectively on complex engineering activities with the engineering community and with society at large, such as,
9 being able to comprehend and write effective reports and design documentation, make effective
presentations, and give and receive clear instructions.
PO10: Project management and finance: Demonstrate knowledge and understanding of the engineering and management principles and apply these to
10
one’s own work, as a member and leader in a team, to manage projects and in multidisciplinary environments.
PO11: Life-long learning: Recognize the need for, and have the preparation and ability to engage in independent and life-long learning in the broadest
11
context of technological change.
The Program Specific Outcomes (PSOs) of UG Program in Computer Science & Engineering
AUMP 7
The Program Educational Objectives (PEOs) of UG Program in Computer Science &
Engineering
2
PEO-2: To engage in advanced studies and research, continuously
advancing knowledge in the dynamic field of Computer Science.
PEO-3: To demonstrate professionalism, collaborative skills, and a
strong sense of social responsibility in both personal and professional
3
endeavors.
Course Description
Course Outcomes:
The student will be able to
• Describe DBMS architecture, physical and logical database designs, database modeling, relational,
hierarchical and network models.
• Identify basic database storage structures and access techniques such as file organizations, indexing
methods including B‐tree, and hashing.
• Learn and apply Structured query language (SQL) for database definition and database manipulation.
• Demonstrate an understanding of normalization theory and apply such knowledge to the normalization
of a database.
• Understand various transaction processing, concurrency control mechanisms and database protection
mechanisms.
Amity School of Engineering & Technology
Syllabus
Course Code: CSE 304 Credit Units: 03
Total Hours: 45
Course Contents:
Module I: Introduction: (9 Hours)
Concept and goals of DBMS, Database Languages, Database Users, Database Abstraction.
Basic Concepts of ER Model, Relationship sets, Keys, Mapping, Design of ER Model ,Concept of Generalization, Aggregation and Specialization. transforming
ER diagram into the tables. Various other data models object oriented data Model, Network data model, and Relational data model.
Module II: Relational Data models: (9 Hours)
Domains, Tuples, Attributes, Relations, Characteristics of relations, Keys, Key attributes of relation, Relational database, Schemas, Integrity constraints.
Referential integrity, Intension and Extension, Relational Query languages: SQL-DDL, DML, integrity constraints, Complex queries, various joins, indexing,
triggers ,Relational algebra and relational calculus, Relational algebra operations like select, Project, Join, Division, outer union. Tuple relational calculus.
Module III: Data Base Design: (9 Hours)
Data Base Design: Introduction to normalization, Normal forms, Functional dependency, Decomposition, Dependency preservation and lossless join,
problems with null valued and dangling tuples, multivalued dependencies.
Module IV: Transaction Processing Concepts: (9 Hours)
Transaction System, Testing of Serilizability, Serializability of schedules, conflict & view serializable schedule, recoverability, Recovery from transaction
failures. Log based recovery. Checkpoints deadlock handling. Concurrency Control Techniques: – Concurrency Control, locking Techniques for concurrency
control, time stamping protocols for concurrency control, validation-based protocol, multiple granularity. Multi version schemes, Recovery with concurrent
transaction.
Module V: Relational Database Management Systems: (9 Hours)
Study of Relational Database Management Systems through Oracle/Postgres SQL/MySQL: Architecture, physical files, memory structures, background
process. Concept of table spaces, segments, extents and block. Dedicated server, multi-threaded server, distributed database. Introduction of ANSI SQL.
Usage of like, any, all, exists, views and other commands, Special operators. Hierarchical queries, inline queries, flashback queries
Amity School of Engineering & Technology
Text:
•Korth, Silberschatz, “Database System Concepts”, 4th Ed., TMH, 2000.
•Steve Bobrowski, “Oracle & Architecture”, TMH, 2000
References:
•Date C. J., “An Introduction to Database Systems”, 7th Ed., Narosa Publishing, 2004
•Elmsari and Navathe, “Fundamentals of Database Systems”, 4th Ed., A. Wesley, 2004
•Ullman J. D., “Principles of Database Systems”, 2nd Ed., Galgotia Publications, 1999.
Amity School of Engineering & Technology
MODULE - I
Amity School of Engineering & Technology
What is Data?
A single piece of data is a single fact about something that interests us.
•
Amity School of Engineering & Technology
What is Database?
• Database: Database is a collection of inter-related data which helps in efficient
retrieval, insertion and deletion of data from database and organizes the data in the
form of tables, views, schemas, reports etc.
For Example, university database organizes the data about students, faculty, and
admin staff etc. which helps in efficient retrieval, insertion and deletion of data from
it.
• Now Database Management talks about
– Create Database
– Retrieve(View) database
– Update database
– Delete Database
Amity School of Engineering & Technology
What is DBMS?
• Database Management System: The software which is used to manage database
is called Database Management System (DBMS). For Example, MySQL, Oracle etc.
are popular commercial DBMS used in different applications.
DBMS allows users the following tasks:
• Data Definition: It helps in creation, modification and removal of definitions that
define the organization of data in database.
• Data Updation: It helps in insertion, modification and deletion of the actual data in
the database.
• Data Retrieval: It helps in retrieval of data from the database which can be used by
applications for various purposes.
• User Administration: It helps in registering and monitoring users, enforcing data
security, monitoring performance, maintaining data integrity, dealing with
concurrency control and recovering information corrupted by unexpected failure.
Amity School of Engineering & Technology
Advantages of DBMS
1. Controls database redundancy: It can control data redundancy because it stores all the data in one single
database file and that recorded data is placed in the database.
2. Data sharing: In DBMS, the authorized users of an organization can share the data among multiple users.
3. Easily Maintenance: It can be easily maintainable due to the centralized nature of the database system.
4. Reduce time: It reduces development time and maintenance need.
5. Backup: It provides backup and recovery subsystems which create automatic backup of data
from hardware and software failures and restores the data if required.
6. multiple user interface: It provides different types of user interfaces like graphical user interfaces, application
program interfaces
Disadvantages of DBMS
1. Cost of Hardware and Software: It requires a high speed of data processor and large memory size to run DBMS
software.
2. Size: It occupies a large space of disks and large memory to run them efficiently.
3. Complexity: Database system creates additional complexity and requirements.
4. Higher impact of failure: Failure is highly impacted the database because in most of the organization, all the
data stored in a single database and if the database is damaged due to electric failure or database corruption
then the data may be lost forever.
Department of Computer Science & Engineering, Amity School of Engineering and Technology, Amity University, Gwalior, Madhya Pradesh, India
Amity School of Engineering & Technology
Data Models
• A collection of tools for describing
– Data
– Data relationships
– Data semantics
– Data constraints
• Relational model
• Entity-Relationship data model (mainly for database design)
• Object-based data models (Object-oriented and Object-relational)
• Semistructured data model (XML)
• Other older models:
– Network model
– Hierarchical model
Amity School of Engineering & Technology
Department of Computer Science & Engineering, Amity School of Engineering and Technology, Amity University, Gwalior, Madhya Pradesh, India
Amity School of Engineering & Technology
Department of Computer Science & Engineering, Amity School of Engineering and Technology, Amity University, Gwalior, Madhya Pradesh, India
Amity School of Engineering & Technology
Department of Computer Science & Engineering, Amity School of Engineering and Technology, Amity University, Gwalior, Madhya Pradesh, India
Amity School of Engineering & Technology
Database Users
Users are differentiated by the way they expect to interact with
the system.
• Application programmers: interact with system through DML
calls.
• Specialized users: write specialized database applications that
do not fit into the traditional data processing framework
• Sophisticated users: form requests in a database query
language.
• Naive users: invoke one of the permanent application programs
that have been written previously
Amity School of Engineering & Technology
Database Administrator(DBA)
• Coordinates all the activities of the database system; the database administrator has a
good understanding of the enterprise’s information resources and needs:
• Database administrator’s duties include:
– Schema definition
– Storage structure and access method definition
– Schema and physical organization modification
– Granting user authority to access the database
– Specifying integrity constraints
– Monitoring performance and responding to changes in requirements
Amity School of Engineering & Technology
Database Users
Database
Amity School of Engineering & Technology
Database System Components
Amity School of Engineering & Technology
Department of Computer Science & Engineering, Amity School of Engineering and Technology, Amity University, Gwalior, Madhya Pradesh, India
Amity School of Engineering & Technology
3-Tier Architecture
• The 3-Tier architecture contains another layer between the
client and server. In this architecture, client can't directly
communicate with the server.
• The application on the client-end interacts with an application
server which further communicates with the database system.
• End user has no idea about the existence of the database
beyond the application server. The database also has no idea
about any other user beyond the application.
• The 3-Tier architecture is used in case of large web
application.
Department of Computer Science & Engineering, Amity School of Engineering and Technology, Amity University, Gwalior, Madhya Pradesh, India
Amity School of Engineering & Technology
Three schema Architecture
• The three schema architecture is also called ANSI/SPARC architecture or three-level architecture.
• This framework is used to describe the structure of a specific database system.
• The three schema architecture is also used to separate the user applications and physical database.
• The three schema architecture contains three-levels. It breaks the database down into three different categories.
The three-schema architecture is as follows:
Department of Computer Science & Engineering, Amity School of Engineering and Technology, Amity University, Gwalior, Madhya Pradesh, India
Amity School of Engineering & Technology
Levels of Abstraction
• Physical level: describes how a record (e.g., instructor) is stored.
• Logical level: describes data stored in database, and the relationships
among the data.
type instructor = record
ID : string;
name : string;
dept_name : string;
salary : integer;
end;
• View level: application programs hide details of data types. Views can also
hide information (such as an employee’s salary) for security purposes.
Amity School of Engineering & Technology
View of Data
An architecture for a database system
Amity School of Engineering & Technology
Database Abstraction:
• Data abstraction is the process of hiding unwanted and irrelevant details from the end user. It helps to
store information in such a way that the end user can access data which is necessary, the user will not be
able to see what data is stored or how it is stored in a database. Data abstraction helps to keep data
secure from unauthorized access and it hides all the implementation details.
• Levels of Abstraction in DBMS
• There are three levels of data abstraction in DBMS that are mentioned below.
Database Abstraction:
1. Physical or Internal Level
• It is the lowest level of data abstraction which defines how data is stored in database . It defines
data structures used to store data and methods to access data in database. It is very complex to
understand and hence kept hidden from user. Database administrator decides how and where
to store the data in database.
• Physical level deals with actual storage details like data organization, disk space allocation and
data access methods.
2. Logical or Conceptual Level
• It is intermediate level present next to physical level. It defines what data is present in database
and their relationships between them . It is less complex as compared to physical level.
Programmers generally work at this level and depending on data, structure of tables,
relationships and their constraints is decided at this level.
3. View or External Level
• It is the highest level in abstraction. There are different levels of views and each view defines
only a part of whole data required to user. This level defines many views of same database for
simplication of view to user. This is the highest level and easiest to understand for user.
Amity School of Engineering & Technology
Entity Sets
• An entity is an object that exists and is distinguishable from other objects.
– Example: specific person, company, event, plant
• An entity set is a set of entities of the same type that share the same properties.
– Example: set of all persons, companies, trees, holidays
• An entity is represented by a set of attributes; i.e., descriptive properties possessed
by all members of an entity set.
– Example:
instructor = (ID, name, street, city, salary )
course= (course_id, title, credits)
• A subset of the attributes form a primary key of the entity set; i.e., uniquely
identifiying each member of the set.
Amity School of Engineering & Technology
Relationship Sets
• A relationship is an association among several entities
Example:
44553 (Peltier) advisor 22222 (Einstein)
student entity relationship set instructor entity
• A relationship set is a mathematical relation among n 2 entities, each taken from entity
sets
{(e1, e2, … en) | e1 E1, e2 E2, …, en En}
Complex Attributes
• Attribute types:
– Simple and composite attributes.
– Single-valued and multivalued attributes
• Example: multivalued attribute: phone_numbers
– Derived attributes
• Can be computed from other attributes
• Example: age, given date_of_birth
• Domain – the set of permitted values for each attribute
Amity School of Engineering & Technology
Composite Attributes
Amity School of Engineering & Technology
Mapping Cardinalities
Mapping Cardinalities
E-R Diagrams
Entity-Relationship Diagrams (E-R diagrams) can express the overall
logical structure of a database graphically
An E-R diagram consists of the following major components:
• Rectangles divided into two parts represent entity sets. The first part, which
is shaded blue, contains the name of the entity set. The second
part contains the names of all the attributes of the entity set.
• Diamonds represent relationship sets.
• Undivided rectangles represent the attributes of a relationship set. Attributes
that are part of the primary key are underlined.
• Lines link entity sets to relationship sets.
• Dashed lines link attributes of a relationship set to the relationship set.
• Double lines indicate total participation of an entity in a relationship set.
• Double diamonds represent identifying relationship sets linked to weak
entity sets (we discuss identifying relationship sets and weak entity sets later)
Amity School of Engineering & Technology
Entity Sets
n Entities can be represented graphically as follows:
• Rectangles represent entity sets.
• Attributes listed inside entity rectangle
• Underline indicates primary key attributes
Amity School of Engineering & Technology
Relationship Sets
n Diamonds represent relationship sets.
Amity School of Engineering & Technology
Cardinality Constraints
• We express cardinality constraints by drawing either a directed line (), signifying
“one,” or an undirected line (—), signifying “many,” between the relationship set
and the entity set.
One-to-Many Relationship
Many-to-One Relationships
Many-to-Many Relationship
n A line may have an associated minimum and maximum cardinality, shown in the form l..h,
where l is the minimum and h the maximum cardinality
n A minimum value of 1 indicates total participation.
n A maximum value of 1 indicates that the entity participates in at most one relationship
n A maximum value of * indicates no limit.
Instructor can advise 0 or more students. A student must have 1 advisor; cannot
have multiple advisors
Amity School of Engineering & Technology
Alternative ER Notations
• Chen, IDE1FX, …
Amity School of Engineering & Technology
Alternative ER Notations
Chen IDE1FX (Crows feet notation)
Amity School of Engineering & Technology
• A weak entity set becomes a table that includes a column for the primary key of
the identifying strong entity set
Concept of Generalization
• For example, consider a database that contains information
about employees in a company. The employees can be
classified into two categories: permanent employees and
temporary employees. Instead of having two separate tables
for permanent and temporary employees, a generalization of
the two entities into a single entity called “EMPLOYEE” can
be created. The “EMPLOYEE” entity will have two subtypes:
“P_EMPLOYEE” and “T_EMPLOYEE”.
Department of Computer Science & Engineering, Amity School of Engineering and Technology, Amity University, Gwalior, Madhya Pradesh, India
Amity School of Engineering & Technology
Concept of Specialization
Department of Computer Science & Engineering, Amity School of Engineering and Technology, Amity University, Gwalior, Madhya Pradesh, India
Amity School of Engineering & Technology
Data Models
• Data Model is the modeling of the data description, data semantics, and consistency
constraints of the data. It provides the conceptual tools for describing the design of a database
at each level of data abstraction.
• Types of Data Models
1. Object-Oriented Data Model
• The object-oriented data model integrates object-oriented programming principles into
databases, allowing data to be stored as objects.
• This model is suitable for applications requiring complex data representations.
Characteristics:
• Object Structure: Data is represented as objects, similar to object-oriented programming
languages.
• Encapsulation: Combines data and behavior (methods) in objects.
• Inheritance: Supports inheritance of properties and methods.
Advantages:
• Seamless integration with object-oriented programming.
• Suitable for applications with complex data structures.
Department of Computer Science & Engineering, Amity School of Engineering and Technology, Amity University, Gwalior, Madhya Pradesh, India
Amity School of Engineering & Technology
Data Models
Disadvantages:
• Complexity in implementation.
• It is less useful compared to the relational
model.
2. Hierarchical Data Model
• The hierarchical data model organizes data in a
treelike structure, where each record has a
single parent and one or more children.
• This model is ideal for representing data with a
clear hierarchical relationship, such as
organizational charts or file systems.
Characteristics:
• ParentChild Relationship: Each node (record) is
linked to a single parent.
• Navigational Access: Data retrieval involves
navigating through the hierarchy.
• Simplicity: Simple to understand and implement
for hierarchical data.
Department of Computer Science & Engineering, Amity School of Engineering and Technology, Amity University, Gwalior, Madhya Pradesh, India
Amity School of Engineering & Technology
Data Models
Advantages:
• Efficient for queries that require traversing
hierarchies.
• Enforces data integrity through parent-child
relationships.
Disadvantages:
• Lack of flexibility: changes in the hierarchy
can be complex.
• Difficult to model many-to-many relationships.
3.Network Data Model
• The network data model is an extension of the
hierarchical model, allowing multiple parent-
child relationships, thus creating a graph
structure.
• This model is suitable for complex data
relationships.
Department of Computer Science & Engineering, Amity School of Engineering and Technology, Amity University, Gwalior, Madhya Pradesh, India
Amity School of Engineering & Technology
Data Models
Characteristics:
• Graph Structure: Data is represented as a collection of records connected by links.
• Flexibility: Supports many-to-many relationships.
• Set-based access: Data can be accessed through predefined paths (sets).
Advantages:
• More flexible than the hierarchical model.
• Efficient for complex queries involving interconnected data.
Disadvantages:
• Complexity in implementation and maintenance.
• Navigational access can be cumbersome.
4. Relational Data Model
• The most widely used model is the relational model. According to this concept, data is kept in
two-dimensional tables. Data is organized into rows and columns. Tables are the cornerstone
of a relational paradigm. For this reason, in the model, the tables are referred to as relations.
Department of Computer Science & Engineering, Amity School of Engineering and Technology, Amity University, Gwalior, Madhya Pradesh, India
Amity School of Engineering & Technology
Data Models
Characteristics
• Triples: The term "tuple" refers to each row in the table. Every row contains every detail
pertaining to a single, unique instance. The information about each individual in the following
example is filled in a row; for example, the first row includes information about Ramesh.
• Field: A field or quality The characteristic that characterizes a table or connection is its
attribute. The values of the attributes have to be in the same domain. The characteristics of an
Employee in the example below, such as their address, age, and employee ID, are called
attributes.
Advantages Names employee Phone_No Address AGE
ID
1. Scalable: The user may easily add as many
rows and columns as they would like to this Ramesh 34 987654274 Pune 32
model. 5
2. Structural independence: It is feasible to Arya 27 923475488 Mumbai 22
change the database's structure without also 8
changing how information is accessed. Kumari 16 879845612 Pune 25
Structural independence is achieved if we 3
can change the database structure without Vishva 23 886534129 Pune 33
affecting the DBMS's capacity to access 8
data. Department of Computer Science & Engineering, Amity School of Engineering and Technology, Amity University, Gwalior, Madhya Pradesh, India
Amity School of Engineering & Technology
Data Models
Disadvantages
1. Hardware Overheads: This paradigm requires more potent processors and data storage devices in order to
mask complexity and simplify user interfaces.
2. Improper Design: Users can access data without understanding how it is stored because the model is
incredibly simple to generate and use. A poor database could be created as a result of the design's simplicity,
and when the database grows, its growth might stall.
Department of Computer Science & Engineering, Amity School of Engineering and Technology, Amity University, Gwalior, Madhya Pradesh, India
Amity School of Engineering & Technology
Assignment 1
1. Explain the fundamental concepts of a Database Management System (DBMS). How does a DBMS address the
limitations of file-based systems? Discuss the primary goals of a DBMS.
2. Identify the different types of database users and their roles. How do their needs and interactions with the database
differ?
3. Discuss the responsibilities of a Database Administrator (DBA). How does a DBA contribute to the overall efficiency,
security, and performance of a database system?
4. Explain the concept of database abstraction. Discuss the three levels of database abstraction (physical, logical, and
view levels) with suitable examples. Why is this abstraction important in database management?
5. Discuss the concept of relationship sets in the ER model. How do relationship sets differ from entity sets? Provide
examples to illustrate your answer.
6. Define and differentiate between generalization, aggregation, and specialization in the context of an ER model.
Provide examples of each and discuss their significance in database design.
7. Compare and contrast the object-oriented data model, network data model, and relational data model. What are the
advantages and disadvantages of each model?
Department of Computer Science & Engineering, Amity School of Engineering and Technology, Amity University, Gwalior, Madhya Pradesh, India
Amity School of Engineering & Technology
End of Module 1