DATABASE ENGINEERING
Abhipsa Mahala
Department of Computer Science & Engineering
C. V. Raman Global University
Vision and Mission
Vision of the C. V. Raman Global University: To emerge as a
global leader in the arena of technical education commensurate with
the dynamic global scenario for the benefit of mankind.
Vision of the Department of CSE: To become a leader in
providing high quality education and research in the area of
Computer Science, Information Technology, and allied areas.
Mission of C.V. Raman Global University:
To provide state-of-art technical education in the undergraduate
and postgraduate levels;
To work collaboratively with technical
Institutes/Universities/Industries of National and International repute;
To keep abreast with latest technological advancements;
To enhance the Research and Development activities”.
Mission of the Department of CSE:
M1: To develop human resource with sound theoretical and practical
knowledge in the discipline of Computer Science & Engineering.
M2: To work in groups for Research, Projects, and Co-Curricular
activities involving modern methods, tools and technology.
M3: To collaborate and interact with professionals from industry,
academia, professional societies, community groups for
enhancement of quality of education.
Program Outcomes
1. Engineering knowledge: Apply the knowledge of mathematics, science,
engineering fundamentals, and an engineering specialization for the solution
of complex engineering problems.
2. Problem analysis: Identify, formulate, research literature, and analyze
complex engineering problems reaching substantiated conclusions using first
principles of mathematics, natural sciences, and engineering sciences.
3. Design/development of solutions: Design solutions for complex engineering
problems and design system components or processes that meet the specified
needs with appropriate consideration for public health and safety, and cultural,
societal, and environmental considerations.
4. Conduct investigations of complex problems: Use research-based
knowledge and research methods including design of experiments, analysis
and interpretation of data, and synthesis of the information to provide valid
conclusions.
5. Modern tool usage: Create, select, and apply appropriate techniques,
resources, and modern engineering and IT tools, including prediction and
modeling to complex engineering activities, with an understanding of the
limitations.
6. The engineer and society: Apply reasoning informed by the contextual
knowledge to assess societal, health, safety, legal, and cultural issues and the
consequent responsibilities relevant to the professional engineering practice.
7. Environment and sustainability: Understand the impact of the professional
engineering solutions in societal and environmental contexts, and demonstrate
the knowledge of, and need for sustainable development.
8. Ethics: Apply ethical principles and commit to professional ethics and
responsibilities and norms of the engineering practice.
9. Individual and team work: Function effectively as an individual, and as a
member or leader in diverse teams, and in multidisciplinary settings.
10. Communication: Communicate effectively on complex engineering activities
with the engineering community and with the society at large, such as, being
able to comprehend and write effective reports and design documentation,
make effective presentations, and give and receive clear instructions.
11. Project management and finance: Demonstrate knowledge and
understanding of the engineering and management principles and apply these
to one’s own work, as a member and leader in a team, to manage
projects and in multidisciplinary environments.
12. Life-long learning: Recognize the need for, and have the preparation and
ability to engage in independent and life-long learning in the broadest context
of technological change.
Program Educational Objectives & Program Specific Outcomes
PEO1: To provide the fundamental PSO-1: The ability to understand,
knowledge in mathematics, science and analyze and develop computer
engineering concepts for the programs in the area of computer
development of engineering system science and to solve computer software
(Fundamental Knowledge). and hardware related engineering
problems.
PEO2: To apply current industry
accepted computing practices and PSO-2: The ability to develop software
emerging technologies to analyse, systems to allow convenient use of
design, implement, test and verify high computing system and posses
quality computing systems and professional skills and knowledge of
computer based solutions to real world software design processes.
problems (Design and Development).
PSO-3: The ability to gain knowledge in
PEO3: To enable the use of diverse area of computer science and
appropriate skill sets and its apply for successful career
applications towards social impacts of entrepreneurship and higher studies.
computing technologies in the career
related activities (Skill Set) and to PSO-4: Ability to use knowledge of
produce Efficient team leaders, ethical and management principles
effective communicators and capable of required to work in a team as well as to
working in multi-disciplinary lead a team
environment following ethical values
(Communication).
PEO4: To practice professionally and
ethically in various positions of industry
or government and/or succeed in
graduate (Professionalism) with
lifelong learning and to make
substantial contributions to the society
(Societal Contribution).
Module–1 (09 hrs.)
Introduction to DBMS and ER Data Model:
Data Storage: File processing system, Disadvantages; DBMS: Need of DBMS, Terms: Data, Database,
Metadata, Data Dictionary, Database System, Database Management System, Data Abstraction, Data
Independence, System Architecture of DBMS, Data Model: Definition, ER and Relational Data Model,
Object Oriented, Object Relational Models; ER Model: Entity, Entity Set, Attributes, Primary Key,
Relationship, Types and Attributes of Relationship, Role, Cardinality Ratio, Participation Constraint,
Weak Entity Set, EER Features.
Module–2 (07 hrs.)
Relational Data Model:
Terms: Relation, Schema, Attributes, Tuples, Domains, Relation Degree (or Arity) and Cardinality,
Relation Intention and Extension, Super Key, Candidate Key, Primary Key and Foreign Key, Relational
Model Constraints, Schema Diagram, ER to Relation Mapping, Detailed storage architecture.
Module–3 (08 hrs.)
Relational Algebra and Relational Calculus:
Relational Algebra and its Operations: Set Theoretic Operators (Union, Intersection, Cartesian
product and Division), Relational Algebra operators (Projection, Selection, Join and Rename),
Relational Calculus: TRC, DRC, Database Language: SQL (DDL, DML, DCL), QBE.
Module–4 (09 hrs.)
Normalization:
Normalization: Anomalies of un-Normalized Relation, Need of Normalization, Pros and Cons of
Normalization, Functional Dependency: Trivial, Full, Partial, Transitive, Multi-valued, Join, Inclusion
Dependency, Dependency Diagram, Inference Rules for Functional Dependencies, Closure of
Functional Dependencies, Algorithms to find: 1. Candidate Key, 2. Closure of Attribute Set, 3.
Minimal Cover of Functional Dependencies, Normal Forms: Checking of Lossless Join Decomposition
and Dependency Preservation, Normal Forms: 1NF, 2NF, 3NF, BCNF, 4NF, 5NF.
Module-5 (09 hrs.)
Transaction Processing & Management:
Transaction: Concept, ACID properties, Transaction States; Schedule: Definition, Types of Schedule,
Serializability, Conflict and View Serializability, Precedence Graph, Recoverable Schedule, Cascade
less Schedule, Deadlock, Concurrency Control Protocols: Lock Based, Timestamp Based Protocol,
Recovery System: Log based Recovery, Checkpoint, Shadow paging.
Text Books & Reference
Text Books :
1. “Database System Concepts”, Silberschatz, Korth, Sudarshan, McGraw Hill International Edition, ISBN- 0-
07-228363-7, 4th Edition.
2. “Fundamentals of Database Systems”, Elmasri and Navathe, Pearson Education, ISBN 81-297-0228-2, 4th
Edition.
Reference Books:
1. “Database Systems”, Thomas Connolly and Carolyn Begg, Pearson Education, ISBN 81-7808-861-4, 3rd
Edition.
2. “Database Management Systems”, Ramakrishnan and Gehrke, McGraw-Hill International Edition, ISBN 0-
07-115110-9, 3rd Edition.
3. “An Introduction to Database Systems” , Bipin Desai, Galgotia Publications
Open Source:
1. https://nptel.ac.in/courses/106106093/
2. https://www.coursera.org/specializations/database-systems
3. https://nptel.ac.in/courses/106104028/
21-01-2025
Module-I Overview
THREE SCHEMA EER FEATURES
FILE PROCESSING Topic Topic
ARCHITECTURE
SYSTEM
2 3 4 5
1
DATABASE Topic DATA MODELS Topic
Topic MANAGEMENT
SYSTEM
File System
• An early attempt to computerize the manual filing system.
• Method of storing and organizing computer files and the data to make it easy
to find and access.
• Use storage devices like:
Primary Storage
Secondary Storage
Tertiary Storage
7
21-01-2025
File processing system
These represent different software
applications or programs that need
to access, process, or generate data.
The file system is a mechanism for
storing, organizing, and accessing
files on a storage medium (such as a
hard drive, SSD, etc.).
These are files that are used by the
applications. Each file likely represents
some form of stored data, such as a text
file, CSV file, database file, or configuration
file.
Figure: example of how applications and file
systems interact with each other
Example of File processing system
Interface
The file system acts as
the intermediary layer
that manages the files
and ensures that each
application can access
the files it needs.
8
21-01-2025
Characteristics of File Processing System
1. It is a group of files storing data of an organization.
In a File Processing System, data is stored in multiple individual files. Each
file serves as a data repository for a specific department or function within
the organization.
Example: A company might have separate files for employee records,
customer details, and sales transactions.
2. Each file is independent from one another.
Files are not interrelated, meaning there are no direct connections or
relationships between them.
This independence can lead to data redundancy and inconsistencies since
the same data might exist in multiple files without synchronization.
Characteristics of File Processing System
3. Each file is called a flat file.
A flat file is a simple, plain text or binary file containing data in a structured
or tabular format.
These files are typically used for storing data in rows and columns without
any relational links between the records.
4. Each file contains and processes information for one specific function
like accounting or inventory.
Files are designed to meet the needs of specific tasks or departments.
Example:
A file for inventory might contain details about products, stock levels, and suppliers.
A file for accounting might store transaction records and financial statements.
9
21-01-2025
Characteristics of File Processing System
5. Files are designed using application programs written in programming
languages such as COBOL, C, C++, etc.
Developers create custom programs to process and manage these files.
Example:
A program written in COBOL might be used to generate payroll reports from an
employee file.
Another program in C might handle customer orders from a sales file.
The logic for file management (e.g., reading, writing, and updating data) is
embedded directly in the application code.
Advantages of File Processing System
1. Simplicity: Easy to implement and manage for small applications.
2. Low Cost: Can be implemented with basic file management tools provided by the
operating system.
3. Customizability: Developers have direct control over how data is stored, accessed,
and processed.
4. Performance for Small Data Sets: Performs well when managing small amounts
of data or when processing sequential files.
5. No Need for Specialized Software: Data is stored as plain files, which can be read
by various programs like text editors or spreadsheets.
1
0
21-01-2025
Disadvantages of File Processing System
1. Data Redundancy and Inconsistency:
• Duplicate data may exist in multiple files, leading to redundancy.
• Updates to one file may not propagate to others, causing inconsistencies.
2. Lack of Data Integrity:
• No centralized mechanism to enforce data integrity rules (e.g., constraints on data
validity).
3. Limited Scalability:
• Becomes inefficient as the volume of data grows due to lack of indexing and search
optimization.
4. Difficulty in Data Sharing:
• File-based systems are not designed for multi-user environments, leading to
potential conflicts and limited data accessibility.
Disadvantages of File Processing System
5. Security Concerns:
• File systems lack built-in security features, making data vulnerable to unauthorized
access.
6. No Standardized Query Language:
• Unlike databases, there is no structured query language (like SQL) for retrieving and
manipulating data.
7. Data Dependence:
• Applications are tightly coupled with the data structure of files. Changes to the file
structure may require modifying the application code.
8. Lack of Backup and Recovery Mechanisms:
• File systems do not have built-in mechanisms for automatic backups or recovery in case
of failure.
9. Concurrency Issues:
• File systems struggle with simultaneous access by multiple users, leading to potential
conflicts or data corruption.
1
1
21-01-2025
Why Databases?
• Scientists (biologists) have to manage huge quantities of data
• Results of experiments
• References to relevant publications
• Those data need to be stored in a consistent way, shared and analyzed
• Which are the experiments on a cellular biology done at my lab in 2009?
• Which are the publications of my group?
• Databases are a possible solution to this issue
Basic Definitions
■ Data:
■ Known facts that can be recorded and have an implicit meaning.
1
2
21-01-2025
■ Database:
■ A database is an organized collection of data, so that it can be easily accessed and
managed.
■ Database Management System (DBMS):
■ Collection of inter-related data and set of programs to access those data.
■ Helps to store and retrieve database information in a convenient and efficient manner.
■ Database System:
■ The DBMS software together with the data itself. Sometimes, the applications are also
included.
■ DB + DBMS = DBS
1
3
21-01-2025
Metadata: Data about data
Data dictionary: A Data Dictionary is a collection of names, definitions, and attributes about data
elements that are being used or captured in a database.
1
4
21-01-2025
Simplified Database System Environment
Functions of DBMS
• Define a particular database in terms of its data types, structures, and constraints
• Manipulating the database
• Protection or Security measures to prevent unauthorized access
• Processing and Sharing by a set of concurrent users and application programs – yet,
keeping all data valid and consistent
• Presentation and Visualization of data
• Maintaining the database and associated programs over the lifetime of the database
application
1
5
21-01-2025
Example of a simple database Example of a simplified database
catalog
Figure: A database that stores student and course information and their catalog
Advantages of Database System
1. Reduced Data Redundancy: Data is stored centrally in a database, eliminating the need for duplicate data across
multiple files.
Saves storage space and ensures updates to data are consistent across all applications.
Example: A customer’s details are stored in a single table instead of duplicating them in billing and shipping systems.
2. Improved Data Consistency: Centralized control ensures that all users see the same data, reducing errors caused by
inconsistent updates.
Keeps the system reliable by avoiding mismatches in data.
Example: Updating a product's price in the database reflects the same price across all departments.
3. Enhanced Data Security: Databases provide mechanisms like authentication, role-based access control, and
encryption to safeguard data.
Prevents unauthorized access and protects sensitive information.
Example: Only HR personnel can access employee salary details.
10
21-01-2025
Advantages of Database System (Cont.)
4. Better Data Integration: Combines data from various sources into a unified structure, allowing better
management and analysis.
Helps organizations maintain a single source of truth across departments.
Example: Sales and inventory data are integrated, enabling real-time tracking of stock availability.
5. Improved Data Access and Querying: Databases use SQL (Structured Query Language) to retrieve and
manipulate data efficiently.
Allows quick and complex queries without requiring advanced coding skills.
Example: A query can instantly retrieve all sales records for a specific month.
6. Data Backup and Recovery: Database systems have built-in tools to back up data and restore it in case of
failures.
Ensures critical data is not lost due to hardware crashes or human errors.
Example: Automatic nightly backups protect against accidental deletions.
Advantages of Database System
7. Multi-User Access: Multiple users can access and work on the database simultaneously without conflicts.
Improves collaboration and ensures real-time updates for all users.
Example: Several employees can update an inventory system without overwriting each other's changes.
8. Scalability: Database systems can handle increasing amounts of data and users as the organization grows.
Ensures consistent performance, even under high workloads.
Example: A database for a small e-commerce site can scale up to support millions of users.
9. Improved Decision-Making: Databases allow real-time data analysis and generate accurate reports.
Provides actionable insights that support better strategic decisions.
Example: A dashboard showing current sales trends helps management forecast future demand.
11
21-01-2025
Advantages of Database System
10. Data Independence: Applications are decoupled from the database structure, allowing changes to the
database without affecting application logic.
Makes the system easier to maintain and adapt to changing requirements.
Example: Adding a new field to a database table doesn’t require rewriting the entire application code.
11. Reduced Development Time: Features like indexing, constraints, and relationships reduce the need for custom
code.
Speeds up the development and deployment of applications.
Example: Built-in indexing allows quick data retrieval without additional coding.
12. Support for Complex Transactions: Databases ensure data integrity during multi-step operations like
financial transactions.
Prevents data loss or corruption if an operation is interrupted.
Example: A bank transfer ensures that either both debit and credit operations complete successfully or neither does.
DBMS Architecture
In DBMS architecture, in RDBMS, the database and its components are
stored on disk and managed by the RDBMS software, which provides
facilities for adding, updating, and deleting data, as well as searching and
retrieving data based on specific conditions.
12
21-01-2025
DBMS Architecture (Contd.)
1-Tier Architecture
The simplest form of DBMS architecture is the 1-tier DBMS design, where
all DBMS components reside on a single server or platform, allowing direct
access to the database by end users.
DBMS Architecture (Contd.)
2-Tier Architecture
• It refers to a client-server architecture where
the user interface and the application logic
are separated into two separate
components.
• The client component is typically the user
interface and the server component is
responsible for handling the data and
business logic.
• In this architecture, the client component
communicates directly with the server
component to request data and perform
actions.
13
21-01-2025
DBMS Architecture
3-Tier Architecture
• Another layer exists between the client and server in
the 3-Tier architecture. The client cannot communicate
directly with the server with this design.
• On the client side, the program communicates with an
application server, which then communicates with the
database system.
• Beyond the application server, the end-user has no
knowledge of the database’s existence. Aside from the
application, the database has no knowledge of any
other users.
Three Schema Architecture of
DBMS
It is a framework that separates the database system into three levels:
1. Internal Schema ,
2. Conceptual Schema , and
3. External Schema .
This architecture was proposed to achieve data abstraction and independence between
the physical storage of data and how it is accessed by users.
14