DATABASE MANAGEMENT
SYSTEM
ECCDLO 6014
TE EXTC, SEM-VI
Department Level Optional Course
Course Pre-requisite:
FEC 205 : C Programming
June 19, 2025
ECL 304 : Skill Lab :- C++ and Java Programming
ECL 405 : Skill Lab :- Python Programming
Database Management System
Course Objectives:
Learn and practice data modeling using the
entity-relationship and developing database
designs
Understand the use of Structured Query
Language (SQL) and learn SQL syntax.
Understand the needs of database processing
and learn techniques for controlling the
consequences of concurrent data access 2
Understand the concept of database security
and privacy
Course Outcome:
After successful completion of the course
student will be able to
June 19, 2025
Describe the fundamentals of database
systems, different data models and design
issues in database.
Database Management System
Understand the different types of data
models.
Understand the basics of relational Algebra
and calculus.
Design ER diagram, relational schemas, apply
concepts of normalization to relational
database design.
Implement views, triggers and querying the
database using SQL.
Understand transaction management and 3
concurrency control.
DATABASE SYSTEM
June 19, 2025
Database
Structured
Database Management System
------IRCTC, University, Facebook,
Flipkart
Unstructured
-------webpages
DBMS
------- SQL server
------- oracle 9,11,12C
4
------- my SQL
June 19, 2025 Database Management System
5
The DBMS manages incoming data, organizes
it, and provides ways for the data to be
June 19, 2025
modified or extracted by users or other
programs.
Some DBMS examples include MySQL,
PostgreSQL, Microsoft
Database Management System
Access, SQL Server, FileMaker, Oracle,
RDBMS, dBASE, Clipper,
Database Management Systems (DBMS) are
and FoxPro.
software systems used to store, retrieve,
and run queries on data. A DBMS serves as
an interface between an end-user and a
database, allowing users to create, read,
update, and delete data in the database.
It is the technology of storing and retrieving
6
user’s data with utmost efficiency along with
appropriate security measures.
Basis File System DBMS
File system is a software
that manages and DBMS is a software
June 19, 2025
1. Structure organizes the files in a for managing the
storage medium within a database.
computer.
2. Data Redundant data can be In DBMS there is no
Database Management System
Redundancy present in a file system. redundant data.
It doesn’t provide It provides backup
3.Backup and
backup and recovery of and recovery of data
Recovery
data if it is lost. even if it is lost.
There is no efficient Efficient query
4. Query
query processing in file processing is there in
processing
system. DBMS.
There is more data
There is less data
5.Consistency & consistency because
consistency in file 7
Concurrency of the process of
system.
normalization.
June 19, 2025
It has more complexity in
It is less complex as
6. Complexity handling as compared to
compared to DBMS.
file system.
Database Management System
7.Security Constraints File systems provide less DBMS has more security
(Role based access security in comparison to mechanisms as compared
control) DBMS. to file system.
It has a comparatively
It is less expensive than
8.Cost higher cost than a file
DBMS.
system.
There is no data In DBMS data
9. Data Independence
independence. independence exists.
8
Course Course Teaching Scheme Credits Assigned
Code Name (Hrs.)
Theory Practical Tutorial Theory Practical Tutorial Total
June 19, 2025
ECCDLO Database -- -- -- --
6014 Management 03 03 03
System
Database Management System
Course Course Examination Scheme
Code Name Theory Marks Exam Term Practic Total
Internal assessment End Duration Work al and
MTT *CA Sem. Oral
Exa (in Hrs.)
m
ECCDLO Database -- --
6014 Managem 20 20 60 02 100
ent
System
9
Modul Unit Topics Hrs.
e No. No.
1.0 Introduction to Databases 02
June 19, 2025
1.1 Introduction to databases, History of database
system, Benefits of Database system over traditional
file system, relational databases, Three tier database
architecture, Data independence
2.0 Data Models 03
Database Management System
2.1 The importance of data models, Introduction to
various data models (hierarchical, Network,
Relational, Entity relationship and object model),
Basic building blocks, Business rules, Degrees of data
abstraction
3.0 Database Design, ER-Diagram and Unified 08
Modeling Language
3.1 Database design and ER Model: overview, ER-Model
and its Constraints, ER-Diagrams, ERD Issues, weak
entity sets
3.2 Codd‘s rules, Relational Schemas, Introduction to UML
Relational database model: Logical view of data,
keys, integrity rules.
10
Relational Database design: features of good
relational database design, atomic domain
4.0 09
Relational Algebra and Calculus
4.1
Relational algebra: Introduction, Selection and projection,
set operations, renaming, Joins, Division, syntax, semantics.
June 19, 2025
4.2
Operators, grouping and ungrouping, relational comparison.
Calculus: Tuple relational calculus, Domain relational
Calculus, calculus vs algebra, computational capabilities.
4.3
Normalization methods : 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
5.0 10
Constraints, Views and SQL
Database Management System
5.1
What is constraints, types of constrains, Integrity
constraints,
5.2
SQL: data definition, aggregate function, Null Values, nested
sub queries, Joined relations. Triggers.
5.3
Views: Introduction to views, data independence, security,
updates on views, comparison between tables and views
5.4 ** SQL Tools : MySQL, ORACLE 10G, POSTGRESQL
6.0 07
Transaction management and Concurrency control
6.1
Transaction management: ACID properties, serializability
and concurrency control, Lock based concurrency control
(2PL, Deadlocks), Time stamping methods, optimistic
methods, database recovery management.
6.2
Database Security and privacy : Issues, Access Control
based on grant and revoke privileges 11
Textbooks:
1.A Silberschatz, H Korth, S Sudarshan, “Database System and
Concepts‖”, Fifth Edition McGraw-Hill
June 19, 2025
2.Rob, Coronel, “Database Systems”, Seventh Edition, Cengage
Learning.
3.Ramez Elmasri, Shamkant B. Navathe, “Fundamentals of
Database System‖”, Seventh Edition, Person.
Database Management System
4.G. K. Gupta, “Database Management Systems‖”, McGraw – Hill.
Reference Books:
1.Peter Rob and Carlos Coronel, “Database Systems Design,
Implementation and Management”, Thomson Learning, 5th
Edition.
2.P.S. Deshpande, “SQL and PL/SQL for Oracle 11g, Black Book”,
Dreamtech Press Mark L. Gillenson, Paulraj Ponniah, “Introduction
to Database Management”, Wiley
3.Raghu Ramkrishnan and Johannes Gehrke, “Database
Management Systems”, TMH
4.Debabrata Sahoo “Database Management Systems‖ Tata 12
McGraw Hill, Schaum‘s
5.Outline E-Resources:
June 19, 2025 Database Management System
13
Modul Uni Topics Hrs
e No. t .
No.
1.0 Introduction to Databases 02
1.1 Introduction to databases, History of
database system, Benefits of Database
system over traditional file system,
relational databases, Three tier database
architecture, Data independence
OUTLINE
The Need for Databases
Data Models
Relational Databases
Database Design
Storage Manager
Query Processing
Transaction Manager
HISTORY OF DATABASE SYSTEMS
1950s and early 1960s:
Data processing using magnetic tapes for storage
Tapes provided only sequential access
Punched cards for input
Late 1960s and 1970s:
Hard disks allowed direct access to data
Network and hierarchical data models in widespread
use
Ted Codd defines the relational data model
Would win the ACM Turing Award for this work
IBM Research begins System R prototype
UC Berkeley begins Ingres prototype
High-performance (for the era) transaction processing
HISTORY (CONT.)
1980s:
Research relational prototypes evolve into commercial
systems
SQL becomes industrial standard
Parallel and distributed database systems
Object-oriented database systems
1990s:
Large decision support and data-mining applications
Large multi-terabyte data warehouses
Emergence of Web commerce
Early 2000s:
XML and XQuery standards
Automated database administration
Later 2000s:
Giant data storage systems
Google BigTable, Yahoo PNuts, Amazon, ..
DATABASE MANAGEMENT SYSTEM
(DBMS)
DBMS contains information about a particular enterprise
Collection of interrelated data
Set of programs to access the data
An environment that is both convenient and efficient to use
Database Applications:
Banking: transactions
Airlines: reservations, schedules
Universities: registration, grades
Sales: customers, products, purchases
Online retailers: order tracking, customized recommendations
Manufacturing: production, inventory, orders, supply chain
Human resources: employee records, salaries, tax deductions
Databases can be very large.
Databases touch all aspects of our lives
UNIVERSITY DATABASE EXAMPLE
Application program examples
Add new students, instructors, and courses
Register students for courses, and generate
class rosters
Assign grades to students, compute grade
point averages (GPA) and generate
transcripts
In the early days, database applications
were built directly on top of file systems
Why to Learn DBMS?
A modern DBMS has the following characteristics −
June 19, 2025
Real-world entity − A modern DBMS is more realistic and uses
real-world entities to design its architecture. It uses the behavior
and attributes too. For example, a school database may use
students as an entity and their age as an attribute.
Database Management System
Relation-based tables − DBMS allows entities and relations
among them to form tables. A user can understand the
architecture of a database just by looking at the table names.
Isolation of data and application − A database system is
entirely different than its data. A database is an active entity,
whereas data is said to be passive, on which the database works
and organizes. DBMS also stores metadata, which is data about
data, to ease its own process.
Less redundancy − DBMS follows the rules of normalization,
which splits a relation when any of its attributes is having
redundancy in values. Normalization is a mathematically rich and 20
scientific process that reduces data redundancy.
DRAWBACKS OF USING FILE SYSTEMS TO STORE
DATA
Data redundancy and inconsistency
Multiple file formats, duplication of information in
different files
Difficulty in accessing data
Need to write a new program to carry out each
new task
Data isolation
Multiple files and formats
Integrity problems
Integrityconstraints
Hard to add new constraints or change existing
ones
DRAWBACKS OF USING FILE SYSTEMS TO STORE DATA
(CONT.)
Atomicity of updates
Failures may leave database in an inconsistent state with
partial updates carried out
Example: Transfer of funds from one account to another
should either complete or not happen at all
Concurrent access by multiple users
Concurrent access needed for performance
Uncontrolled concurrent accesses can lead to
inconsistencies
Example: Two people reading a balance (say 100) and updating it
by withdrawing money (say 50 each) at the same time
Security problems
Hard to provide user access to some, but not all, data
Database systems offer solutions to all the above
problems
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.
VIEW OF DATA
An architecture for a database system
INSTANCES AND SCHEMAS
Similar to types and variables in programming languages
Logical Schema – the overall logical structure of database
Example: The database consists of information about a set of
customers and accounts in a bank and the relationship between
them
Analogous to type information of a variable in a program
Physical schema–
schema the overall physical structure of the database
Instance – the actual content of the database at a particular point
in time
Analogous to the value of a variable
Physical Data Independence – the ability to modify the physical
schema without changing the logical schema
Applications depend on the logical schema
In general, the interfaces between the various levels and
components should be well defined so that changes in some parts
do not seriously influence others.
DATABASE ARCHITECTURE
June 19, 2025
The design of a DBMS depends on its architecture. It
can be centralized or decentralized or hierarchical.
The architecture of a DBMS can be seen as either
single tier or multi-tier. An n-tier architecture divides
Database Management System
the whole system into related but
independent n modules, which can be
independently modified, altered, changed, or
replaced.
In 1-tier architecture, the DBMS is the only entity
where the user directly sits on the DBMS and uses it.
Any changes done here will directly be done on the
DBMS itself. It does not provide handy tools for end-
users.
Database designers and programmers normally
prefer to use single-tier architecture. 26
June 19, 2025
If the architecture of DBMS is 2-tier,
then it must have an application
Database Management System
through which the DBMS can be
accessed.
Programmers use 2-tier architecture
where they access the DBMS by
means of an application. Here the
application tier is entirely independent
of the database in terms of operation,
design, and programming 27
3-TIER ARCHITECTURE
June 19, 2025
A 3-tier architecture separates its tiers from each
other based on the complexity of the users and how
they use the data present in the database. It is the
most widely used architecture to design a DBMS.
Database Management System
28
DBMS 3-TIER ARCHITECTURE
June 19, 2025
DBMS 3-tier architecture divides the
complete system into three inter-related but
independent modules as shown below:
Database Management System
29
June 19, 2025
Physical Level:
At the physical level, the information
about the location of database objects in
Database Management System
the data store is kept.
Various users of DBMS are unaware of the
locations of these objects.
In simple terms, physical level of a
database describes how the data is being
stored in secondary storage devices like
disks and tapes and also gives insights on
additional storage details.
30
June 19, 2025
Conceptual Level:
At conceptual level, data is
represented in the form of various
Database Management System
database tables. For Example, STUDENT
database may contain STUDENT and
COURSE tables which will be visible to
users but users are unaware of their
storage.
Also referred as logical schema, it
describes what kind of data is to be
stored in the database. 31
External Level:
An external level specifies a view of
June 19, 2025
the data in terms of conceptual level
tables. Each external level view is used
to cater to the needs of a particular
Database Management System
category of users.
For Example, FACULTY of a university
is interested in looking course details of
students, STUDENTS are interested in
looking at all details related to
academics, accounts, courses and hostel
details as well. So, different views can be
generated for different users. The main 32
focus of external level is data
abstraction.
June 19, 2025 Database Management System
33
The main objective of three level architecture is to
enable multiple users to access the same data with
a personalized view while storing the underlying
June 19, 2025
data only once. Thus it separates the user's view
from the physical structure of the database. This
separation is desirable for the following reasons:
Different users need different views of the same
Database Management System
data.
The approach in which a particular user needs to
see the data may change over time.
The users of the database should not worry about
the physical implementation and internal workings
of the database such as data compression and
encryption techniques, hashing, optimization of the
internal structures etc.
All users should be able to access the same data
34
according to their requirements.
DBA should be able to change the conceptual
June 19, 2025 Database Management System
35
What is an Entity in DBMS (Database
Management)?
June 19, 2025
In a database management system, an entity is a
piece of data tracked and stored by the system.
This could be something as simple as a customer's
name and address or more complex information
Database Management System
such as an order or invoice. An entity is typically
composed of multiple attributes, the individual
data that make up the Entity.
What are the Attributes of DBMS?
In a database management system, an attribute is
a piece of data that describes an entity. For
example, in a customer database, the attributes
might be name, address, and phone number. In a 36
product database, the attributes might be name,
price, and date of manufacture. Each attribute has
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
RELATIONAL MODEL
All the data is stored in various tables.
Example of tabular data in the relational model
Columns
Rows
A SAMPLE RELATIONAL DATABASE
DATA DEFINITION LANGUAGE (DDL)
Specification notation for defining the database schema
Example: create table instructor (
ID char(5),
name varchar(20),
dept_name varchar(20),
salary numeric(8,2))
DDL compiler generates a set of table templates stored in
a data dictionary
Data dictionary contains metadata (i.e., data about data)
Database schema
Integrity constraints
Primary key (ID uniquely identifies instructors)
Authorization
Who can access what
DATA MANIPULATION LANGUAGE
(DML)
Language for accessing and manipulating
the data organized by the appropriate
data model
DML also known as query language
Two classes of languages
Pure– used for proving properties about
computational power and for optimization
Relational Algebra
Tuple relational calculus
Domain relational calculus
Commercial – used in commercial systems
SQL is the most widely used commercial language
SQL
The most widely used commercial language
SQL is NOT a Turing machine equivalent language
SQL is NOT a Turing machine equivalent language
To be able to compute complex functions SQL is usually
embedded in some higher-level language
Application programs generally access databases through one
of
Language extensions to allow embedded SQL
Application program interface (e.g., ODBC/JDBC) which allow SQL
queries to be sent to a database
E.g. find the name of the customer with customer-id
192-83-7465
select customer.customer-name
from customer
where customer.customer-id = ‘192-83-
7465’
DATABASE DESIGN
The process of designing the general structure of the
database:
Logical Design – Deciding on the database schema.
Database design requires that we find a “good”
collection of relation schemas.
Business decision – What attributes should we record in
the database?
Computer Science decision – What relation schemas
should we have and how should the attributes be
distributed among the various relation schemas?
Physical Design – Deciding on the physical layout of
the database
DATABASE DESIGN (CONT.)
Is there any problem with this relation?
DESIGN APPROACHES
Need to come up with a methodology to
ensure that each of the relations in the
database is “good”
Two ways of doing so:
Entity Relationship Model (Chapter 7)
Models an enterprise as a collection of entities and
relationships
Represented diagrammatically by an entity-
relationship diagram:
Normalization Theory (Chapter 8)
Formalize what designs are bad, and test for them
OBJECT-RELATIONAL DATA MODELS
Relational model: flat, “atomic” values
Object Relational Data Models
Extend the relational data model by including
object orientation and constructs to deal with
added data types.
Allow attributes of tuples to have complex types,
including non-atomic values such as nested
relations.
Preserve relational foundations, in particular the
declarative access to data, while extending
modeling power.
Provide upward compatibility with existing
relational languages.
XML: EXTENSIBLE MARKUP
LANGUAGE
Defined by the WWW Consortium (W3C)
Originally intended as a document markup
language not a database language
The ability to specify new tags, and to
create nested tag structures made XML a
great way to exchange data, not just
documents
XML has become the basis for all new
generation data interchange formats.
A wide variety of tools is available for
parsing, browsing and querying XML
documents/data
DATABASE ENGINE
Storage manager
Query processing
Transaction manager
STORAGE MANAGEMENT
Storage manager is a program module that
provides the interface between the low-level
data stored in the database and the
application programs and queries submitted to
the system.
The storage manager is responsible to the
following tasks:
Interaction with the OS file manager
Efficient storing, retrieving and updating of data
Issues:
Storage access
File organization
Indexing and hashing
QUERY PROCESSING
1. Parsing and translation
2. Optimization
3. Evaluation
QUERY PROCESSING (CONT.)
Alternative ways of evaluating a given
query
Equivalent expressions
Different algorithms for each operation
Cost difference between a good and a bad
way of evaluating a query can be enormous
Need to estimate the cost of operations
Depends critically on statistical information
about relations which the database must
maintain
Need to estimate statistics for intermediate
results to compute cost of complex expressions
TRANSACTION MANAGEMENT
What if the system fails?
What if more than one user is concurrently updating
the same data?
A transaction is a collection of operations that
performs a single logical function in a database
application
Transaction-management component ensures
that the database remains in a consistent (correct)
state despite system failures (e.g., power failures and
operating system crashes) and transaction failures.
Concurrency-control manager controls the
interaction among the concurrent transactions, to
ensure the consistency of the database.
DATABASE USERS AND
ADMINISTRATORS
Database
DATABASE SYSTEM INTERNALS
Overall System Structure
DATABASE ARCHITECTURE
The architecture of a database systems is
greatly influenced by the underlying computer
system on which the database is running:
Centralized
Client-server
Parallel (multi-processor)
Distributed
END OF CHAPTER 1
June 19, 2025 Database Management System
THANK YOU!
58