Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
6 views51 pages

Chapter 1.1 - Overview of Databases

Uploaded by

ishitasooden
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views51 pages

Chapter 1.1 - Overview of Databases

Uploaded by

ishitasooden
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 51

Academic Session 2025-26

ODD Semester Jul-Dec 2025

UNIVERSITY INSTITUTE OF
ENGINEERING

Department of Computer Science & Engineering

Database Management System


(24CSH-204/24ITH-204)
Dr. Pritpal Singh E8067
Assistant Professor. CSE
DISCOVER . LEARN . EMPOWER

08/16/2025 Dr. Pritpal Singh, Asst. Prof., UIE-CSE, Chandigarh University


ABOUT COURSE
• The main DBMS course, we learn about the structural formation of data, maintain data
integrity, multitasking with concurrent access and recovery without occurring crashes,
data structures, data models etc. and their working in which every organization is
based.
• At the end of the course, the students may understand the concepts of data structures,
data models and design, construction of queries by using SQL, uses and applications of
database design etc

08/16/2025 Dr. Pritpal Singh, Asst. Prof., UIE-CSE, Chandigarh University


COURSE OUTCOMES

CO No. Title BT Level


Will be covered in this
lecture
Students will be able to understand the database system
CO1
concepts and design databases for different applications.
BT1,BT2,BT5

Students will be able to identify different types of DDL, DML,


CO2 DCL and TCL commands and their usage. BT2,BT4,BT5

Students will be able to classifying Normalization,


CO3 Dependencies and Denormalization along with their BT3,BT5,BT6
requirements.
Students will be able to analyse and Compare Transaction
CO4
Processing techniques and Recovery techniques.
BT1,BT4
Students will be able to evaluate database performance after
CO5 implementing Triggers, procedures, packages, cursors and BT5,BT6
views.

08/16/2025 Dr. Pritpal Singh, Asst. Prof., UIE-CSE, Chandigarh University


COURSE OBJECTIVES

This course will enable students to,

1. To have good understanding of database system concepts and design databases for
different applications.
2. To learn how to use a DBMS and RDBMS.
3. To implement and understand different types of DDL, DML and DCL statements.
4. To understand transaction concepts related to databases and recovery/backup
techniques required for the proper storage of data.

08/16/2025 Dr. Pritpal Singh, Asst. Prof., UIE-CSE, Chandigarh University


ASSESSMENT MODEL

08/16/2025 Dr. Pritpal Singh, Asst. Prof., UIE-CSE, Chandigarh University


SUGGESTED COURSES
Course Name Provider Duration Focus Area Link
Introduction to IBM 27 hours General https://www.coursera.org/
Databases Database
Fundamentals
learn/introduction-to-databases
Databases and SQL for IBM 13 hours SQL and Data https://www.coursera.org/learn/
Data Science with Science sql-data-science
Python
SQL: A Practical IBM 21 hours Practical SQL https://www.coursera.org/
Introduction for Querying
Querying Databases
learn/sql-practical-introduction-
for-querying-databases
Introduction to NoSQL IBM 16 hours NoSQL https://www.coursera.org/
Databases Database
Concepts
learn/introduction-to-nosql-
databases
Introduction to IBM 18 hours Relational https://www.coursera.org/
Relational Databases Database
(RDBMS) Fundamentals
learn/introduction-to-relational-
databases
Relational Database IBM Not Database https://www.coursera.org/
Administrator (DBA) Specified Administration
learn/relational-database-
administration

08/16/2025 Dr. Pritpal Singh, Asst. Prof., UIE-CSE, Chandigarh University


Activity based learning

08/16/2025 Dr. Pritpal Singh, Asst. Prof., UIE-CSE, Chandigarh University


Have you ever heard of !
Top Companies:
• Google: Known for paying $139,000–$185,000 for data-related roles.
• Meta (Facebook): Offers $150,000–$193,000 for big data engineers​
• Microsoft and Amazon: Regularly hire database professionals with

competitive packages exceeding $100,000 for experienced hires​

08/16/2025 Dr. Pritpal Singh, Asst. Prof., UIE-CSE, Chandigarh University


Highest Salaries Package
Highest Salaries:

Senior Database Administrator: $99,500–


$137,000 annually​

Big Data Engineer: Base salaries range


from $139,000–$193,000 at top companies
like Google and Meta​
.
Data Architect: Senior roles often earn up to
$130,000 annually, reflecting the demand for
designing and managing large-scale data
systems​
Springboard

Data Engineer: Salaries for mid-level
engineers are around $106,000, with senior
roles exceeding $137,000​
08/16/2025 Dr. Pritpal Singh, Asst. Prof., UIE-CSE, Chandigarh University
Applications of DBMS

08/16/2025 Dr. Pritpal Singh, Asst. Prof., UIE-CSE, Chandigarh University


08/16/2025 Dr. Pritpal Singh, Asst. Prof., UIE-CSE, Chandigarh University
Topics covered

Overview of Databases:
Database concepts, DBMS, Data Base System Architecture (Three Level ANSI-
SPARC Architecture), Advantages and Disadvantages of DBMS, Data
Independence, DBA and Responsibilities of DBA, Relational Data Structure, Keys,
Relations, Attributes, Schema and Instances, Referential integrity, Entity integrity.

08/16/2025 Dr. Pritpal Singh, Asst. Prof., UIE-CSE, Chandigarh University


Difference between Data and Information

08/16/2025 Dr. Pritpal Singh, Asst. Prof., UIE-CSE, Chandigarh University


Database Concepts

A Database is a collection of related data


organized to serve multiple applications.

Example: A library database containing


details about books, members, and
borrowing records.

08/16/2025 Dr. Pritpal Singh, Asst. Prof., UIE-CSE, Chandigarh University


Why DBMS is important?
Purpose of Database System
In DBMS, database systems provide a safe and effective platform to manage vast
amounts of data. Their role is to provide services like data organization, storage, and
manipulation, as well as to guarantee data integrity. A database system’s primary goal is to
facilitate data retrieval and provide a dependable storage platform for essential data.

A Database Management System (DBMS) is crucial in modern computing for the following
reasons:
1. Efficient Data Management
DBMS provides a systematic way to store, organize, and manage large amounts of data.
It eliminates redundancy and ensures consistency in data.
2. Data Security
DBMS offers tools to restrict unauthorized access and ensures data integrity through user
authentication and encryption.
It allows role-based access, where specific permissions are granted based on user roles.

08/16/2025 Dr. Pritpal Singh, Asst. Prof., UIE-CSE, Chandigarh University


Why DBMS is important?
3. Data Integrity and Accuracy
Ensures the accuracy and reliability of data through integrity constraints and
validation rules.
Prevents inconsistencies, such as duplication or outdated data.
4. Simplifies Data Access
Provides a user-friendly interface for querying, updating, and managing data.
Query languages like SQL enable users to retrieve specific data efficiently
without needing technical expertise in programming.
5. Concurrency Control
DBMS allows multiple users to access and manipulate data simultaneously
without conflicts, ensuring smooth multitasking and collaboration.
6. Backup and Recovery
Automates data backup processes and provides robust recovery
mechanisms to restore data after accidental deletion or system failure.
08/16/2025 Dr. Pritpal Singh, Asst. Prof., UIE-CSE, Chandigarh University
Traditional File System
The traditional file system is a method of organizing and managing data using
files. It was widely used before the emergence of Database Management
Systems (DBMS). In this system, data is stored in individual files created by
specific applications, and each file operates independently.
Disadvantages of Traditional File System

• Data Redundancy: Multiple copies of the


same data lead to inconsistencies.
• Data Inconsistency: Difficult to maintain
uniform data across files.
• Poor Security: No built-in mechanisms to
protect data from unauthorized access.
• Limited Query Capability: Querying and data
retrieval are slow and manual.

08/16/2025 Dr. Pritpal Singh, Asst. Prof., UIE-CSE, Chandigarh University


Database Management System

DBMS (Database Management System):


A Database Management System (DBMS) is
software that enables users to create, manage,
and interact with databases, ensuring efficient
data storage, retrieval, security, and integrity
while supporting multiple users and applications
simultaneously. Examples include MySQL and
Oracle.

08/16/2025 Dr. Pritpal Singh, Asst. Prof., UIE-CSE, Chandigarh University


Database System Architecture
Database System Architecture:
Database system architecture refers to the design
and organization of a database system, defining how
data is stored, managed, and accessed by users and
applications.
The ANSI-SPARC (American National Standards
Institute - Standards Planning and Requirements
Committee) architecture defines a three-level
abstraction model for database systems. It
separates database design into three distinct layers
to enhance flexibility, data independence, and
security.

08/16/2025 Dr. Pritpal Singh, Asst. Prof., UIE-CSE, Chandigarh University


Traditional File System vs DBMS

08/16/2025 Dr. Pritpal Singh, Asst. Prof., UIE-CSE, Chandigarh University


Database System Architecture
Three-Level ANSI-SPARC Architecture

External level (User view): It is the view how


the user views the database. The data of the
database that is relevant to that user is
described at this level. The external level
consists of several different external views of
the database. In the external view only that
entities, attributes, and relationships are
included that the user wants.

08/16/2025 Dr. Pritpal Singh, Asst. Prof., UIE-CSE, Chandigarh University


Database System Architecture
Three-Level ANSI-SPARC Architecture
Conceptual level: It is the community view of
the database and describes what data is stored
in the database and represents the entities,
their attributes, and their relationships. It
represents the semantic, security, and integrity
information about the data. The middle-level or
the second-level in the three-level architecture
is the conceptual level. This level contains the
logical structure of the entire database, it
represents the complete view of the database
that the organization demands independent of
any storage consideration.
08/16/2025 Dr. Pritpal Singh, Asst. Prof., UIE-CSE, Chandigarh University
Database System Architecture
Three-Level ANSI-SPARC Architecture
Internal level: At the internal level, the
database is represented physically on the
computer. It emphasizes the physical
implementation of the database to do storage
space utilization and to achieve the optimal
runtime performance, and data encryption
techniques. It interfaces with the operating
system to place the data on storage files and
build the storage space, retrieve the data, etc.

08/16/2025 Dr. Pritpal Singh, Asst. Prof., UIE-CSE, Chandigarh University


Mapping between views
• Three view-levels are described by means of three schemas.
• These schemas are stored in the data dictionary.
• In DBMS, each user refers only to its own external schema.
• Hence, the DBMS must transform a request on. a specified external
schema into a request against conceptual schema, and then into a request
against internal schema to store and retrieve data to and from the
database.
• The process to convert a request (from external level) and the result
between view levels is called mapping.
• The mapping defines the correspondence between three view levels.
• The mapping description is also stored in data dictionary.
• The DBMS is responsible for mapping between these three types of
schemas.

08/16/2025 Dr. Pritpal Singh, Asst. Prof., UIE-CSE, Chandigarh University


Types of Mapping between views
i) External-Conceptual mapping
• An external-conceptual mapping defines the correspondence between a
particular
external view and the conceptual view.
• The external-conceptual mapping tells the DBMS which objects on the
conceptual level correspond to the objects requested on a particular user's
external view.
• If changes are made to either an external view or conceptual view, then
mapping must be changed accordingly.
(ii) Conceptual-Internal mapping
• The conceptual-internal mapping defines the correspondence between the
conceptual view and the internal view, i.e. database stored on the physical
storage device.
• It describes how conceptual records are stored and retrieved to and from
the storage device.

08/16/2025 Dr. Pritpal Singh, Asst. Prof., UIE-CSE, Chandigarh University


Example

08/16/2025 Dr. Pritpal Singh, Asst. Prof., UIE-CSE, Chandigarh University


Advantages and Disadvantages of DBMS
Advantages of DBMS
• Data Redundancy Elimination: Centralized data management reduces
duplication and ensures consistency across the database.
• Data Integrity and Accuracy: Enforces constraints (e.g., primary keys)
to ensure data validity and consistency.
• Data Security: Provides controlled access to sensitive data through user
roles and permissions.
• Data Independence: Logical and physical data independence allows
schema changes without affecting applications.
• Backup and Recovery: Automatic recovery mechanisms protect data in
case of system failure.

08/16/2025 Dr. Pritpal Singh, Asst. Prof., UIE-CSE, Chandigarh University


Advantages and Disadvantages of DBMS

Disadvantages of DBMS
• High Initial Cost: Requires significant investment in software, hardware,
and skilled personnel.
• Complexity: DBMS systems can be complex to install, configure, and
maintain.
• Performance Overhead: System overhead from features like security
and abstraction may reduce performance compared to simple file
systems.
• Training Requirements: Requires specialized training for database
administrators (DBAs) and users.
• Potential for System Failure: Centralized control can lead to
widespread disruptions in case of failure.

08/16/2025 Dr. Pritpal Singh, Asst. Prof., UIE-CSE, Chandigarh University


Data Independence
The ability to modify a scheme definition in one level without affecting a
scheme definition in a higher level is called data independence.

There are two kinds:


• Logical data independence
• Physical data independence

08/16/2025 Dr. Pritpal Singh, Asst. Prof., UIE-CSE, Chandigarh University


Data Independence in DBMS

In the context of a database management


system, data independence is the feature
that allows the schema of one layer of the
database system to be changed without
any impact on the schema of the next
higher level of the database system.
Through data independence, we can build
an environment in which data is
independent of all programs, and through
the three schema architectures, data
independence will be more understandable.

08/16/2025 Dr. Pritpal Singh, Asst. Prof., UIE-CSE, Chandigarh University


Types of Data Independence
Logical Data Independence
• Changing the logical schema (conceptual level) without changing the
external schema (view level) is called logical data independence.
• It is used to keep the external schema separate from the logical
schema.
• If we make any changes at the conceptual level of data, it does not
affect the view level.
• This happens at the user interface level.
• For example, it is possible to add or delete new entities, attributes to the
conceptual schema without making any changes to the external
schema.
08/16/2025 Dr. Pritpal Singh, Asst. Prof., UIE-CSE, Chandigarh University
Types of Data Independence

Physical Data Independence


• Making changes to the physical schema without changing the logical
schema is called physical data independence.
• If we change the storage size of the database system server, it will not
affect the conceptual structure of the database.
• It is used to keep the conceptual level separate from the internal level.
• This happens at the logical interface level.
• Example – Changing the location of the database from C drive to D
drive.

08/16/2025 Dr. Pritpal Singh, Asst. Prof., UIE-CSE, Chandigarh University


08/16/2025 Dr. Pritpal Singh, Asst. Prof., UIE-CSE, Chandigarh University
DBA and Responsibilities of DBA
A Database Administrator (DBA) is an individual or person
responsible for controlling, maintaining, coordinating, and operating a
database management system. Managing, securing, and taking care
of the database systems is a prime responsibility. They are
responsible and in charge of authorizing access to the database,
coordinating, capacity, planning, installation, and monitoring uses,
and acquiring and gathering software and hardware resources as and
when needed. Their role also varies from configuration, database
design, migration, security, troubleshooting, backup, and data
recovery. Database administration is a major and key function in any
firm or organization that is relying on one or more databases. They
are overall commanders of the Database system.

08/16/2025 Dr. Pritpal Singh, Asst. Prof., UIE-CSE, Chandigarh University


DBA and Responsibilities of DBA
1. Database Design and Implementation:
• Plan and design the database structure, ensuring it meets organizational requirements.
• Create schemas, tables, and indexes for efficient data storage and access.
2. Database Security:
• Set up user roles and permissions to restrict unauthorized access.
• Monitor database activity for potential security breaches.
3. Backup and Recovery:
• Implement regular data backups to prevent loss in case of failure.
• Design and execute disaster recovery plans for quick restoration.
4. Performance Monitoring and Tuning:
• Optimize database performance by fine-tuning queries, indexes, and storage
mechanisms.
08/16/2025 Dr. Pritpal Singh, Asst. Prof., UIE-CSE, Chandigarh University
DBA and Responsibilities of DBA
5. Database Maintenance:
• Perform regular updates to keep the system running smoothly.
• Clean up outdated or unnecessary data to save storage.
6. Troubleshooting and Problem Resolution:
• Diagnose and resolve database errors and performance issues.
• Work with developers and IT staff to resolve database-related problems.
7. Database Upgrades and Migration:
• Upgrade database systems to newer versions for improved features and security.
• Migrate data during system transitions or upgrades.
8. User Support and Training:
• Assist users in writing efficient queries.
• Provide training to staff on database operations and best practices.
9. Data Integrity:
• Enforce constraints to ensure accuracy, consistency, and validity of stored data.

08/16/2025 Dr. Pritpal Singh, Asst. Prof., UIE-CSE, Chandigarh University


Relational Data Structure
The relational data structure is the backbone of the Relational Database
Management System (RDBMS). It organizes data into tables (relations) with rows
and columns, making it easier to store, access, and manipulate data.
Key Components of Relational
Data Structure:

1.Relation (Table):
• A relation is a two-dimensional
structure consisting of rows
(tuples) and columns
(attributes).
• Represents an entity or object,
such as Students, Employees,
or Products
08/16/2025 Dr. Pritpal Singh, Asst. Prof., UIE-CSE, Chandigarh University
Relational Data Structure
2. Tuple (Row):
• Each row in a table is called a
tuple.
• Represents a single record or
instance of an entity.
3. Attribute (Column):
• Represents a single record or
instance of an entity.
• an attribute.
• Represents a property or
characteristic of the entity.
• Example: SName, SAge, SClass
and SSection are attributes of
the Student entity.
08/16/2025 Dr. Pritpal Singh, Asst. Prof., UIE-CSE, Chandigarh University
Relational Data Structure
4. Schema:
• The structure of a relation,
including the table name, attributes,
and their data types.
Example:
• Schema of Student:
Student(StudentID: INT, Name:
VARCHAR, Age: INT, Course:
VARCHAR)
5. Instance:
• A snapshot of the data in a relation
at a specific point in time.
• Example: The current data in the
Student table is an instance of the
relation.
08/16/2025 Dr. Pritpal Singh, Asst. Prof., UIE-CSE, Chandigarh University
Keys in DBMS
Keys are attributes or sets of attributes that help identify a record (or
tuple) uniquely in a database table. They ensure data integrity and
establish relationships between tables.
Different Types of Database Keys
• Candidate Key
• Primary Key
• Super Key
• Alternate Key
• Foreign Key
• Composite Key

08/16/2025 Dr. Pritpal Singh, Asst. Prof., UIE-CSE, Chandigarh University


Keys in DBMS
Primary Key
A primary key in a table that uniquely identifies each row and column or set of
columns in the table. The primary key is an attribute or a set of attributes that
help to uniquely identify the tuples(records) in the relational table. The primary
key provides the means to distinguish one tuple from all the others in the relation.
It helps the user to identify the location and also the database system to identify,
locate, and refer to one particular tuple in the relation.
Example:
STUDENT table ->
Student(STUD_NO,
SNAME,
ADDRESS, PHONE) ,
STUD_NO is a primary key

08/16/2025 Dr. Pritpal Singh, Asst. Prof., UIE-CSE, Chandigarh University


Keys in DBMS
Candidate Key
A candidate key is a minimal set of attributes that uniquely identifies each tuple
within a table. In other words, there should not be any two rows in a table that
can have the same values for the columns that are the part of candidate key. It is
very important for establishing relationships between tables and maintaining data
integrity. Candidate keys play a pivotal role in database normalization as they
help us to eliminate data redundancy and anomalies.
Example:
STUD_NO is the candidate
key for relation STUDENT.

08/16/2025 Dr. Pritpal Singh, Asst. Prof., UIE-CSE, Chandigarh University


Keys in DBMS
Super Key
We can define a super key as a set of those keys that identify a row or a tuple
uniquely. The word super denotes the superiority of a key. Thus, a super key is
the superset of a key known as a Candidate key. The role of the super key is
simply to identify the tuples of the specified table in the database. It is the
superset where the candidate key is a part of the super key only.
Example:
STUD_NO+PHONE is a super key.

08/16/2025 Dr. Pritpal Singh, Asst. Prof., UIE-CSE, Chandigarh University


Keys in DBMS
Composite Key
Sometimes, a table might not have a single column/attribute that uniquely
identifies all the records of a table. To uniquely identify rows of a table, a
combination of two or more columns/attributes can be used. It still can give
duplicate values in rare cases.

Example:
FULLNAME + DOB can be
combined together to access
the details of a student.

08/16/2025 Dr. Pritpal Singh, Asst. Prof., UIE-CSE, Chandigarh University


Keys in DBMS
Foreign Key
If an attribute can only take the values which are present as values of some
other attribute, it will be a foreign key to the attribute to which it refers. The
relation which is being referenced is called referenced relation and the
corresponding attribute is called referenced attribute.
Example:
Refer Table STUDENT shown
above.
STUD_NO in STUDENT_COURSE
is a foreign key to STUD_NO in
STUDENT relation.

08/16/2025 Dr. Pritpal Singh, Asst. Prof., UIE-CSE, Chandigarh University


Keys in DBMS
Alternate Key
• The candidate key other than the primary key is called an alternate key .
• All the keys which are not primary keys are called alternate keys.
• It is a secondary key.
• It contains two or more fields to identify two or more records.
• These values are repeated.
Example:
Consider the table shown above.
STUD_NO, as well as PHONE both,
are candidate keys for relation
STUDENT but
PHONE will be an alternate key
(only one out of many candidate keys).

08/16/2025 Dr. Pritpal Singh, Asst. Prof., UIE-CSE, Chandigarh University


Keys in DBMS

08/16/2025 Dr. Pritpal Singh, Asst. Prof., UIE-CSE, Chandigarh University


Integrity Constraints
Integrity constraints are rules used in database systems to maintain the
accuracy, consistency, and validity of the data stored in a database. They
ensure that the data adheres to certain conditions and business rules,
thereby preventing invalid or corrupt data from being entered or
manipulated.
Entity Integrity: Entity integrity ensures that every table has a primary key
and that the values in the primary key column(s) are unique and not NULL.
This guarantees that every row in the table can be uniquely identified.

Rules of Entity Integrity:


• A table must have a primary key.
• The primary key values cannot be NULL.
• The primary key must uniquely identify each record.

08/16/2025 Dr. Pritpal Singh, Asst. Prof., UIE-CSE, Chandigarh University


Integrity Constraints
Referential Integrity: Referential integrity ensures that a foreign key in one table
matches a valid primary key in another table. This maintains the relationship
between tables and prevents invalid references.
Rules of Referential Integrity:
• A foreign key value must either:
• Match a primary key value in the referenced table, or
• Be NULL (if the relationship allows null foreign keys).
• A foreign key cannot reference a non-existent primary key.
Domain Integrity: Ensures that data values in a column must belong to a specific
domain (set of valid values or data types).
Rules of Domain Integrity:
• Each column must have a valid data type (e.g., integer, text, date).
• Column values must fall within the defined range or set of acceptable values.
• Disallowed values violate domain integrity.
08/16/2025 Dr. Pritpal Singh, Asst. Prof., UIE-CSE, Chandigarh University
Book References
Textbooks

• Ramez Elmasri and Shamkant B. Navathe, “Fundamentals of Database System”,


The Benjamin / Cummings Publishing Co.
• Korth and Silberschatz Abraham, “Database System Concepts”, McGraw Hall.
• Pratt,” DBMS”, Cengage Learning

Reference books

• C.J.Date, “An Introduction to Database Systems”, Addison Wesley.


• Thomas M. Connolly, Carolyn & E. Begg, “Database Systems: A Practical
Approach to Design, Implementation and Management”, 5/E, University
of Paisley, Addison-Wesley.
• Rob,” Database Principal Fundamental Design, Cengage Learning

08/16/2025 Dr. Pritpal Singh, Asst. Prof., UIE-CSE, Chandigarh University


THANK YOU

08/16/2025 Dr. Pritpal Singh, Asst. Prof., UIE-CSE, Chandigarh University

You might also like