SlideShare a Scribd company logo
1 of 59
Download to read offline
Topic for the class:
Unit -I : Basic Concepts of DBMS
Date & Time : 03/01/2023
Mr. Dasari Prasad
Faculty-CSE
NIT- Andhra Pradesh
Tadepalligudem – 534102
Email: prasad.dasari1126@gmail.com
1
Department of CSE , NIT-AP Course Title: DBMS
10 January 2023
What is Data?
• Data became an essential part of
human life.
•Data is nothing but any facts recorded
in our computer.
•Data may consists of Text, numbers,
image ,video, Audio etc.
10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 2
What is Database?
•Database is nothing but Collection of
related data.
• related means Storing data about a
particular subject/topic/things.
10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 3
What is DBMS?
•DBMS =Database+(Set of programs to
Manage data in the Database)
• Basically DBMS is a Software which
facilitate the storing the data and
applying operations such as retrieving,
Modifying, updating the Database.
10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 4
What is DBMS?
•DBMS reduce the burden on the OS.
• Examples of DBMS
▪MS Access, MS SQL Server By Microsoft
▪Oracle(Licensed), MySQL(Open Source)
By Oracle
10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 5
Database Applications
•Enterprise Information
•Sales: customers, products, purchases
•Accounting: payments, receipts, assets
•Human Resources: Information about
employees, salaries, payroll taxes.
•Manufacturing: management of production,
inventory, orders, supply chain.
10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 6
Database Applications
• Banking and finance
• customer information, accounts, loans, and
banking transactions.
• Credit card transactions
• Finance: sales and purchases of financial
instruments (e.g., stocks and bonds; storing real-
time market data
• Universities: registration, grades
10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 7
Database Applications
•Airlines: reservations, schedules
•Telecommunication: records of calls, texts, and
data usage, generating monthly bills,
maintaining balances on prepaid calling card.
•Navigation systems: For maintaining the
locations of varies places of interest along with
the exact routes of roads, train systems, buses,
etc.
10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 8
Purpose of Databases (Limitations with File
System)
• In the early days, database applications were built directly
on top of file systems, which leads to:
• Data redundancy and inconsistency: data is stored in
multiple file formats resulting in duplication of
information in different files.
• Difficulty in accessing data
• Need to write a new program to carry out each new
task to access the data from file system.
• Data isolation
• Data is alone scattered across multiple files
10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 9
Purpose of Databases(Limitations
with File System)
• Integrity problems
• Integrity constraints (e.g., account balance > 0) become
“buried” in program code rather than being stated
explicitly.
• Hard to add new constraints or change existing ones
• 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
10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 10
Purpose of Databases(Limitations
with File System)
▪Concurrent access needed for performance
• Uncontrolled concurrent accesses can lead to
inconsistencies
• Ex: Two people reading a balance (say 100) and
updating it by withdrawing money (say 50 each) at the
same time
• Data Security
• Hard to provide user access to some, but not all data
10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 11
Advantages with DBMS
•Data Redundancy is reduced or
eliminated in DBMS because all data
are stored at a centralized location
rather than being created by individual
users and for each application..
• Data Replication is allowed
10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 12
Advantages with DBMS
•Data Concurrency
•In DBMS, Data are stored in one or more
servers in the network and that there is
some software locking mechanism that
prevents the same set of data from being
changed by two people at the same time.
10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 13
Advantages with DBMS
• Data Inconsistency
•In traditional file system storage, the changes
made by one user in one application doesn’t
update the changes in other application, given
both have the same set of details. While this is
not the case with DBMS systems as there is a
single repository of data that is defined once
and is accessed by many users, and data are
consistent.
10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 14
Advantages with DBMS
•Data Integration
•Data integration is a process of combining
the data residing at different locations
and present the user with a unified view
of data. DBMS systems allow Data
Integration with much feasibility.
10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 15
Advantages with DBMS
•Data Access
•While in traditional file-based approach, it might
take hours to look for very specific information
that might be needed in the context of some
business emergency, while DBMS reduces this
time to a few seconds. This is a great advantage
of DBMS because we can write small queries
which will search the Database for you and it
will retrieve the information in the fastest way
possible due to its inbuilt searching operations.
10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 16
Advantages with DBMS
•Data Backup and Recovery
•This is another advantage of DBMS as it
provides a strong framework for Data backup,
users are not required to back up their data
periodically and manually, it is automatically
taken care by DBMS. Moreover, in case of a
server crash, DBMS restores the Database to
its previous condition.
10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 17
Advantages with DBMS
•Data Atomicity
•An atomic transaction is one in which all
of the database actions occur or none of
them do. It is the duty of DBMS to store a
complete transaction in the database. If
any transaction is partially completed,
then it rolls backs them.
10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 18
Advantages with DBMS
•Data Security
•DBMS systems provide a strong
framework to protect data privacy and
security. DBMS ensures that only
authorized users have access to data and
there is a mechanism to define access
privileges.
10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 19
Advantages with DBMS
•Reduced Application Development
Time
10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 20
Databases based on type of data
Examples
▪Traditional Databases
▪Multimedia databases
▪ GIS Database
▪Real time Databases
10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 21
Data Model
•Data Model is nothing but it is a
representation of data in the database in a
specific Manner.
▪Data Models are used to show how data is
stored, connected, accessed and updated
in the database management system
10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 22
Hierarchical Data Model
• Hierarchical Model was the first DBMS model. This model
organizes the data in the hierarchical tree structure.
• The hierarchy starts from the root which has root data and
then it expands in the form of a tree adding child node to the
parent node.
• Ex: IMS(IBM Information
Management System)
10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 23
Network Data Model
• This model is an extension of the hierarchical model. It was
the most popular model before the relational model.
• This model is the same as the hierarchical model, the only
difference is that a record can have more than one parent. It
replaces the hierarchical tree with a graph.
• Ex: IDS(Integrated Data Store)
• It is an Early Network DB
10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 24
Object-oriented Data Model
• The real-world problems are more closely represented
through the object-oriented data model.
• In this model, both the data and relationship are
present in a single structure known as an object
10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 25
Entity-Relationship(E-R) Data Model
• simply ER Model is a high-level data model diagram. In this
model, we represent the real-world problem in the pictorial
form to make it easy for the stakeholders to understand.
10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 26
Relational Data Model
• Relational Model is the most widely used model. In this
model, the data is maintained in the form of a two-
dimensional table.
• All the information is stored in the form of row and
columns.
• The basic structure of a relational model is tables. So,
the tables are also called relations in the relational
model.
10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 27
Relational Data Model
10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 28
Types of Databases based on Data
Model
▪Hierarchical Databases
▪Network Databases
▪Object-Oriented Databases
▪Relational Databases
▪Cloud Databases
10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 29
Databases based on database Schema
1. Structured Databases(SQL
Databases) ---uses Relational data
model
Ex: Oracle, MySQL ,MS SQL Server
2. Unstructured Databases(NoSQL
Databases)
Ex: MongoDB , CouchDB, Cassandra etc
10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 30
Database Languages
• Language used to communicate with Database ---
SQL
• SQL(Structured Query Language) is a query
language to access databases.
• SQL have 4 components
1.DDL (Data Definition Language)
2.DML (Data Manipulation Language)
3. DCL (Data Control Language)
4. TCL (Transaction Control Language)
10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 31
DDL(Data Definition Language)
•Data Definition Language (DDL) is a set of
special Database commands that allows us
to Create or define database and modify
the structure and the metadata of the
database.
• These commands can be used to create,
modify, and delete the database structures
such as schema, tables etc.
10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 32
DDL(Data Definition Language)
Database Commands that comes under DDL are C,A,D
C- Create
A- Alter
D- Drop
Create COMMAND: used to create database table along with its
schema(Structure of database)
Syntax:
Create table <table-name>(Attribute1 datatype,Attribute2
datatype,……..,AttributeN data type, Integrity Constraints1,2…N);
10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 33
DDL(Data Definition Language)
Ex:
Create table student(name varchar(20),roll int(10),marks int(10));
10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 34
DDL(Data Definition Language)
Alter Command: used to change the Database schema
Syntax:
❖ Adding the column to the Table
1.alter table <table-name> add <column-name>
<data-type>;
❖ Deleting the Column from the table
2. alter table <table-name> drop COLUMN <column-
name>;
10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 35
DDL(Data Definition Language)
Alter Command: used to change the Database schema
❖ TO Rename the Column of the Table
3. Alter table <table-name> rename COLUMN <old-
Column-name> to <new-Column-name>;
❖ TO Change the datatype of the column
4. Alter table <table-name> modify COLUMN <column-
name> <new-datatype>
10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 36
DDL(Data Definition Language)
DROP Command: used to Completely delete the
Structure of the table and its data.
Syntax:
drop table <table-name>;
Ex:
Drop table student;
10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 37
DML(Data Manipulation Language)
• DDL do changes to the Structure of the table where
as DML works on data inside the table includes data
insert , delete, update and retrieve the data.
• Database commands comes under DML are S,I,D,U
S-Select
I- Insert
D- Delete
U- Update
10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 38
DML(Data Manipulation Language)
Select Command: is used to Retrieve the Data from
the data base
Syntax:
❖Select [attribute1,attribute2… or *] from <table-
name>;
❖Select [attribute1,attribute2… or *] from <table-
name> where <condition>
Ex: select sname from student;
select * from student;
select * from student where roll=10
10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 39
DML(Data Manipulation Language)
Insert Command: used to place the data into the database
table.
Syntax:
❖insert into <table-name> values(value1,value2,…);
❖Insert into <table-name>(column1,2,…) values(value1,2,3….)
Ex: insert into student values(‘Prasad’,10,’CSE’,’NIT-AP’);
insert into student(name,roll) values(‘prasad’,10);
10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 40
DML(Data Manipulation Language)
Delete Command: used to delete the records of the database
table based on condition but not delete table structure.
Syntax:
❖delete from <table-name>; //to delete all records
❖delete from <table-name> where <condition>; //delete specific
Ex:
delete from student;
delete from student where roll=10; //delete specific
10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 41
DML(Data Manipulation Language)
Update Command: used to replace any data in the database
table.
Syntax:
//To update specific record
❖update <table-name> SET A1=V1,A2=V2….where <condition>;
❖update <table-name> SET A1=V1,A2=V2;//To update all
records
Note: A1,A2,…. Are Attributes and V1,V2,….. Are Values
Ex: update student SET marks=70 where roll=10;
update student SET marks=70;
10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 42
Views of database
10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 43
Views of database
• A major purpose of a database system is to provide users with
an abstract view of the data. That is, the system hides certain
details of how the data are stored and maintained.
• Physical level. The lowest level of abstraction describes how
the data are actually stored. The physical level describes
complex low-level data structures in detail.
• Logical level. The next-higher level of abstraction describes
what data are stored in the database, and what relationships
exist among those data.
10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 44
Views of database
• View level: The highest level of abstraction describes only part of
the entire database. Many users of the database system do not
need all this information; instead, they need to access only a part of
the database.
• The system may provide many views for the same database.
• Database systems have several schemas, partitioned according to
the levels of abstraction. The physical schema describes the
database design at the physical level, while the logical schema
describes the database design at the logical level. A database may
also have several schemas at the view level, sometimes called
subschemas or External schema, that describe different views of
the database
10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 45
Data independence
10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 46
Data Independence
Physical Data Independence :
• Physical Data Independence is defined as the ability to make
changes in the structure of the lowest level of the DBMS without
affecting the higher-level schemas. Hence, modification in the
Physical level should not result in any changes in the Logical or View
levels.
Logical Data Independence
• Logical Data Independence is defined as the ability to make changes
in the structure of the middle level of the DBMS without affecting
the highest-level schema or application programs. Hence,
modification in the logical level should not result in any changes in
the view levels or application programs.
10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 47
Database Design
• The database design process can be divided into six steps.
• The ER model is most relevant to the first three steps.
1. Requirements Analysis: The very first step in designing a
database application is to understand what data is to be stored
in the database, what applications must be built on top of it, and
what operations are most frequent and subject to performance
requirements.
2. Conceptual Database Design: The information gathered in the
requirements analysis step is used to develop a high-level
description of the data to be stored in the database, along with
the constraints known to hold over this data. This step is often
carried out using the E-R(Entity-Relationship) model.
10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 48
Database Design
3. Logical Database Design: We must choose a DBMS to
implement our database design, and convert the conceptual
database design into a database schema in the data model of
the chosen DBMS.
4. Schema Refinement: T to analyze the collection of relations in
our relational database schema to identify potential problems,
and to refine it. We will use Normalization to refine database
schema to avoid data redundancy.
5. Physical Database Design: Specifies how database tables
exactly stores in the physical memory i.e collection of files stores
as sequence of bytes. This step may simply involve building
indexes on some tables and clustering some tables, to ensure
that it meets desired performance criteria.
10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 49
Database Design
6. Application and Security Design: Any software project that
involves a DBMS must consider aspects of the application that
go beyond the database itself. For each user, we must identify
the parts of the database that must be accessible and the parts
of the database that must not be accessible, and we must take
steps to ensure that these access rules are enforced.
10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 50
DBMS Architecture
10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 51
DBMS Architecture
Database Users and User Interfaces
• There are four different types of database-system users,
differentiated by the way they expect to interact with the
system. Different types of user interfaces have been designed
for the different types of users. • Naive users : are
unsophisticated users who interact with the system by invoking
one of the application programs that have been written
previously.
• For example, a clerk in the university who needs to add a new
instructor to department A invokes a program called new hire.
This program asks the clerk for the name of the new instructor,
her new ID, the name of the department (that is, A), and the
salary.
10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 52
DBMS Architecture
• Application programmers: are computer professionals who write
application programs. Application programmers can choose from many
tools to develop user interfaces.
• Sophisticated users interact: with the system without writing programs.
Instead, they form their requests either using a database query language
or by using tools such as data analysis software. Analysts who submit
queries to explore data in the database fall in this category.
• Database Administrator: One of the main reasons for using DBMSs is to
have central control of both the data and the programs that access those
data. A person who has such central control over the system is called a
database administrator (DBA).
• The functions of a DBA include:
• Schema definition. The DBA creates the original database schema
• Storage structure and access-method definition.
• Granting of authorization for data access
10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 53
DBMS Architecture
The Query Processor
The query processor components include:
• DDL interpreter, which interprets DDL statements and records the
definitions in the data dictionary.
• DML compiler, which translates DML statements in a query
language into an evaluation plan consisting of low-level instructions
that the query evaluation engine understands. A query can usually
be translated into any of a number of alternative evaluation plans
that all give the same result. The DML compiler also performs query
optimization; that is, it picks the lowest cost evaluation plan from
among the alternatives.
• Query evaluation engine: which executes low-level instructions
generated by the DML compiler
10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 54
DBMS Architecture
Storage Manager
• The storage manager is the component of a database system
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 for the interaction with the
file manager. The raw data are stored on the disk using the file
system provided by the operating system.
• The storage manager translates the various DML statements
into low-level file-system commands. Thus, the storage
manager is responsible for storing, retrieving, and updating
data in the database.
10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 55
DBMS Architecture
The storage manager components include:
• Authorization and integrity manager, which tests for the
satisfaction of integrity constraints and checks the authority of
users to access data.
• Transaction manager, which ensures that the database
remains in a consistent (correct) state despite system failures,
and that concurrent transaction executions proceed without
conflicting.
• File manager, which manages the allocation of space on disk
storage and the data structures used to represent information
stored on disk.
10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 56
DBMS Architecture
• Buffer manager, which is responsible for fetching data from disk
storage into main memory, and deciding what data to cache in main
memory.
The buffer manager is a critical part of the database system, since it
enables the database to handle data sizes that are much larger than
the size of main memory.
The storage manager implements several data structures as part of
the physical system implementation:
• Data files, which store the database itself.
• Data dictionary, which stores metadata about the structure of the
database, in particular the schema of the database.
• Indices, which can provide fast access to data items. Like the index
in this textbook,
10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 57
History of Databases
• 1950s and early 1960s: Magnetic tapes were developed for data storage.
• Late 1960s and 1970s: Widespread use of hard disks in the late 1960s changed the
scenario for data processing greatly, since hard disks allowed direct access to data.
• Charles Bachman was the first person to develop the Integrated Data Store (IDS) which
was based on network data model for which he was inaugurated with the Turing Award
(The most prestigious award which is equivalent to Nobel prize in the field of Computer
Science.). It was developed in early 1960’s.
• In the late 1960’s, IBM (International Business Machines Corporation) developed the
Integrated Management System. It was developed based on the hierarchical database
model. IBM Db2 also released which is RDBMS.
• It was during the year 1970 that the relational database model was developed by Edgar
F.Codd. Many of the database models we use today are relational based. It was
considered the standardized database model from then
10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 58
History of Databases
• By the early 1980s, relational databases had become competitive with network and
hierarchical database systems even in the area of performance. Relational databases
were so easy to use that they eventually replaced network and hierarchical databases;
• The relational model was still in use by many people in the market.Later during the same
decade (1980’s), IBM developed the Structured Query Language (SQL) as a part of R
project. It was declared as a standard language for the queries by ISO and ANSI. The
Transaction Management Systems for processing transactions was also developed by
James Gray for which he was felicitated the Turing Award.
• 1990s: The major event of the 1990s was the explosive growth of the World WideWeb.
Databases were deployed much more extensively than ever before.
10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 59

More Related Content

Similar to DBMS.pdf

Lecture 01 - Data, Information, knowledge, and Data Models.pptx
Lecture 01 - Data, Information, knowledge, and Data Models.pptxLecture 01 - Data, Information, knowledge, and Data Models.pptx
Lecture 01 - Data, Information, knowledge, and Data Models.pptxlouisnguyenn25
 
Database management system.pptx
Database management system.pptxDatabase management system.pptx
Database management system.pptxAshmitKashyap1
 
Overview of Databases and Data Modelling-1.pdf
Overview of Databases and Data Modelling-1.pdfOverview of Databases and Data Modelling-1.pdf
Overview of Databases and Data Modelling-1.pdfChristalin Nelson
 
Database and Database Management (DBM): Health Informatics
Database and Database Management (DBM): Health InformaticsDatabase and Database Management (DBM): Health Informatics
Database and Database Management (DBM): Health InformaticsZulfiquer Ahmed Amin
 
Introduction to Database Management System
Introduction to Database Management SystemIntroduction to Database Management System
Introduction to Database Management SystemAmiya9439793168
 
Database management system (dbms)
Database management system (dbms)Database management system (dbms)
Database management system (dbms)Md. Sumon Fakir
 
Database Management system
Database Management systemDatabase Management system
Database Management systemVijay Thorat
 
Chapter-2 Database System Concepts and Architecture
Chapter-2 Database System Concepts and ArchitectureChapter-2 Database System Concepts and Architecture
Chapter-2 Database System Concepts and ArchitectureKunal Anand
 
Physical Database Requirements.pdf
Physical Database Requirements.pdfPhysical Database Requirements.pdf
Physical Database Requirements.pdfseifusisay06
 
Database-management-system-dbms-ppt.pptx
Database-management-system-dbms-ppt.pptxDatabase-management-system-dbms-ppt.pptx
Database-management-system-dbms-ppt.pptxDhruveeHalvadiya
 

Similar to DBMS.pdf (20)

File system vs DBMS
File system vs DBMSFile system vs DBMS
File system vs DBMS
 
Lecture 1 =Unit 1 Part 1.ppt
Lecture 1 =Unit 1 Part 1.pptLecture 1 =Unit 1 Part 1.ppt
Lecture 1 =Unit 1 Part 1.ppt
 
DBMS.pptx
DBMS.pptxDBMS.pptx
DBMS.pptx
 
Unit 1.pptx
Unit 1.pptxUnit 1.pptx
Unit 1.pptx
 
Unit1 DBMS Introduction
Unit1 DBMS IntroductionUnit1 DBMS Introduction
Unit1 DBMS Introduction
 
Lecture 01 - Data, Information, knowledge, and Data Models.pptx
Lecture 01 - Data, Information, knowledge, and Data Models.pptxLecture 01 - Data, Information, knowledge, and Data Models.pptx
Lecture 01 - Data, Information, knowledge, and Data Models.pptx
 
Database management system.pptx
Database management system.pptxDatabase management system.pptx
Database management system.pptx
 
Lecture#5
Lecture#5Lecture#5
Lecture#5
 
Overview of Databases and Data Modelling-1.pdf
Overview of Databases and Data Modelling-1.pdfOverview of Databases and Data Modelling-1.pdf
Overview of Databases and Data Modelling-1.pdf
 
Unit 1 dbms
Unit 1 dbmsUnit 1 dbms
Unit 1 dbms
 
Database and Database Management (DBM): Health Informatics
Database and Database Management (DBM): Health InformaticsDatabase and Database Management (DBM): Health Informatics
Database and Database Management (DBM): Health Informatics
 
Introduction to Database Management System
Introduction to Database Management SystemIntroduction to Database Management System
Introduction to Database Management System
 
Fundamentals of DBMS
Fundamentals of DBMSFundamentals of DBMS
Fundamentals of DBMS
 
Database management system (dbms)
Database management system (dbms)Database management system (dbms)
Database management system (dbms)
 
Database Management system
Database Management systemDatabase Management system
Database Management system
 
Chapter-2 Database System Concepts and Architecture
Chapter-2 Database System Concepts and ArchitectureChapter-2 Database System Concepts and Architecture
Chapter-2 Database System Concepts and Architecture
 
Physical Database Requirements.pdf
Physical Database Requirements.pdfPhysical Database Requirements.pdf
Physical Database Requirements.pdf
 
Ch01
Ch01Ch01
Ch01
 
Database-management-system-dbms-ppt.pptx
Database-management-system-dbms-ppt.pptxDatabase-management-system-dbms-ppt.pptx
Database-management-system-dbms-ppt.pptx
 
DBMS.pptx
DBMS.pptxDBMS.pptx
DBMS.pptx
 

Recently uploaded

Trauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical PrinciplesTrauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical PrinciplesPooky Knightsmith
 
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community PartnershipsSpring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community Partnershipsexpandedwebsite
 
e-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopale-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi RajagopalEADTU
 
The Liver & Gallbladder (Anatomy & Physiology).pptx
The Liver &  Gallbladder (Anatomy & Physiology).pptxThe Liver &  Gallbladder (Anatomy & Physiology).pptx
The Liver & Gallbladder (Anatomy & Physiology).pptxVishal Singh
 
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...Nguyen Thanh Tu Collection
 
SPLICE Working Group: Reusable Code Examples
SPLICE Working Group:Reusable Code ExamplesSPLICE Working Group:Reusable Code Examples
SPLICE Working Group: Reusable Code ExamplesPeter Brusilovsky
 
ANTI PARKISON DRUGS.pptx
ANTI         PARKISON          DRUGS.pptxANTI         PARKISON          DRUGS.pptx
ANTI PARKISON DRUGS.pptxPoojaSen20
 
An overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismAn overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismDabee Kamal
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...Nguyen Thanh Tu Collection
 
Climbers and Creepers used in landscaping
Climbers and Creepers used in landscapingClimbers and Creepers used in landscaping
Climbers and Creepers used in landscapingDr. M. Kumaresan Hort.
 
Scopus Indexed Journals 2024 - ISCOPUS Publications
Scopus Indexed Journals 2024 - ISCOPUS PublicationsScopus Indexed Journals 2024 - ISCOPUS Publications
Scopus Indexed Journals 2024 - ISCOPUS PublicationsISCOPE Publication
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsSandeep D Chaudhary
 
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...Gary Wood
 
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading RoomSternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading RoomSean M. Fox
 
Improved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio AppImproved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio AppCeline George
 

Recently uploaded (20)

Supporting Newcomer Multilingual Learners
Supporting Newcomer  Multilingual LearnersSupporting Newcomer  Multilingual Learners
Supporting Newcomer Multilingual Learners
 
Trauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical PrinciplesTrauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical Principles
 
Mattingly "AI & Prompt Design: Named Entity Recognition"
Mattingly "AI & Prompt Design: Named Entity Recognition"Mattingly "AI & Prompt Design: Named Entity Recognition"
Mattingly "AI & Prompt Design: Named Entity Recognition"
 
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community PartnershipsSpring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
 
e-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopale-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopal
 
The Liver & Gallbladder (Anatomy & Physiology).pptx
The Liver &  Gallbladder (Anatomy & Physiology).pptxThe Liver &  Gallbladder (Anatomy & Physiology).pptx
The Liver & Gallbladder (Anatomy & Physiology).pptx
 
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
 
SPLICE Working Group: Reusable Code Examples
SPLICE Working Group:Reusable Code ExamplesSPLICE Working Group:Reusable Code Examples
SPLICE Working Group: Reusable Code Examples
 
ANTI PARKISON DRUGS.pptx
ANTI         PARKISON          DRUGS.pptxANTI         PARKISON          DRUGS.pptx
ANTI PARKISON DRUGS.pptx
 
An overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismAn overview of the various scriptures in Hinduism
An overview of the various scriptures in Hinduism
 
Mattingly "AI and Prompt Design: LLMs with NER"
Mattingly "AI and Prompt Design: LLMs with NER"Mattingly "AI and Prompt Design: LLMs with NER"
Mattingly "AI and Prompt Design: LLMs with NER"
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
 
OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...
 
Climbers and Creepers used in landscaping
Climbers and Creepers used in landscapingClimbers and Creepers used in landscaping
Climbers and Creepers used in landscaping
 
Scopus Indexed Journals 2024 - ISCOPUS Publications
Scopus Indexed Journals 2024 - ISCOPUS PublicationsScopus Indexed Journals 2024 - ISCOPUS Publications
Scopus Indexed Journals 2024 - ISCOPUS Publications
 
Including Mental Health Support in Project Delivery, 14 May.pdf
Including Mental Health Support in Project Delivery, 14 May.pdfIncluding Mental Health Support in Project Delivery, 14 May.pdf
Including Mental Health Support in Project Delivery, 14 May.pdf
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & Systems
 
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
 
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading RoomSternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
 
Improved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio AppImproved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio App
 

DBMS.pdf

  • 1. Topic for the class: Unit -I : Basic Concepts of DBMS Date & Time : 03/01/2023 Mr. Dasari Prasad Faculty-CSE NIT- Andhra Pradesh Tadepalligudem – 534102 Email: prasad.dasari1126@gmail.com 1 Department of CSE , NIT-AP Course Title: DBMS 10 January 2023
  • 2. What is Data? • Data became an essential part of human life. •Data is nothing but any facts recorded in our computer. •Data may consists of Text, numbers, image ,video, Audio etc. 10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 2
  • 3. What is Database? •Database is nothing but Collection of related data. • related means Storing data about a particular subject/topic/things. 10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 3
  • 4. What is DBMS? •DBMS =Database+(Set of programs to Manage data in the Database) • Basically DBMS is a Software which facilitate the storing the data and applying operations such as retrieving, Modifying, updating the Database. 10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 4
  • 5. What is DBMS? •DBMS reduce the burden on the OS. • Examples of DBMS ▪MS Access, MS SQL Server By Microsoft ▪Oracle(Licensed), MySQL(Open Source) By Oracle 10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 5
  • 6. Database Applications •Enterprise Information •Sales: customers, products, purchases •Accounting: payments, receipts, assets •Human Resources: Information about employees, salaries, payroll taxes. •Manufacturing: management of production, inventory, orders, supply chain. 10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 6
  • 7. Database Applications • Banking and finance • customer information, accounts, loans, and banking transactions. • Credit card transactions • Finance: sales and purchases of financial instruments (e.g., stocks and bonds; storing real- time market data • Universities: registration, grades 10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 7
  • 8. Database Applications •Airlines: reservations, schedules •Telecommunication: records of calls, texts, and data usage, generating monthly bills, maintaining balances on prepaid calling card. •Navigation systems: For maintaining the locations of varies places of interest along with the exact routes of roads, train systems, buses, etc. 10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 8
  • 9. Purpose of Databases (Limitations with File System) • In the early days, database applications were built directly on top of file systems, which leads to: • Data redundancy and inconsistency: data is stored in multiple file formats resulting in duplication of information in different files. • Difficulty in accessing data • Need to write a new program to carry out each new task to access the data from file system. • Data isolation • Data is alone scattered across multiple files 10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 9
  • 10. Purpose of Databases(Limitations with File System) • Integrity problems • Integrity constraints (e.g., account balance > 0) become “buried” in program code rather than being stated explicitly. • Hard to add new constraints or change existing ones • 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 10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 10
  • 11. Purpose of Databases(Limitations with File System) ▪Concurrent access needed for performance • Uncontrolled concurrent accesses can lead to inconsistencies • Ex: Two people reading a balance (say 100) and updating it by withdrawing money (say 50 each) at the same time • Data Security • Hard to provide user access to some, but not all data 10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 11
  • 12. Advantages with DBMS •Data Redundancy is reduced or eliminated in DBMS because all data are stored at a centralized location rather than being created by individual users and for each application.. • Data Replication is allowed 10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 12
  • 13. Advantages with DBMS •Data Concurrency •In DBMS, Data are stored in one or more servers in the network and that there is some software locking mechanism that prevents the same set of data from being changed by two people at the same time. 10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 13
  • 14. Advantages with DBMS • Data Inconsistency •In traditional file system storage, the changes made by one user in one application doesn’t update the changes in other application, given both have the same set of details. While this is not the case with DBMS systems as there is a single repository of data that is defined once and is accessed by many users, and data are consistent. 10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 14
  • 15. Advantages with DBMS •Data Integration •Data integration is a process of combining the data residing at different locations and present the user with a unified view of data. DBMS systems allow Data Integration with much feasibility. 10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 15
  • 16. Advantages with DBMS •Data Access •While in traditional file-based approach, it might take hours to look for very specific information that might be needed in the context of some business emergency, while DBMS reduces this time to a few seconds. This is a great advantage of DBMS because we can write small queries which will search the Database for you and it will retrieve the information in the fastest way possible due to its inbuilt searching operations. 10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 16
  • 17. Advantages with DBMS •Data Backup and Recovery •This is another advantage of DBMS as it provides a strong framework for Data backup, users are not required to back up their data periodically and manually, it is automatically taken care by DBMS. Moreover, in case of a server crash, DBMS restores the Database to its previous condition. 10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 17
  • 18. Advantages with DBMS •Data Atomicity •An atomic transaction is one in which all of the database actions occur or none of them do. It is the duty of DBMS to store a complete transaction in the database. If any transaction is partially completed, then it rolls backs them. 10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 18
  • 19. Advantages with DBMS •Data Security •DBMS systems provide a strong framework to protect data privacy and security. DBMS ensures that only authorized users have access to data and there is a mechanism to define access privileges. 10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 19
  • 20. Advantages with DBMS •Reduced Application Development Time 10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 20
  • 21. Databases based on type of data Examples ▪Traditional Databases ▪Multimedia databases ▪ GIS Database ▪Real time Databases 10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 21
  • 22. Data Model •Data Model is nothing but it is a representation of data in the database in a specific Manner. ▪Data Models are used to show how data is stored, connected, accessed and updated in the database management system 10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 22
  • 23. Hierarchical Data Model • Hierarchical Model was the first DBMS model. This model organizes the data in the hierarchical tree structure. • The hierarchy starts from the root which has root data and then it expands in the form of a tree adding child node to the parent node. • Ex: IMS(IBM Information Management System) 10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 23
  • 24. Network Data Model • This model is an extension of the hierarchical model. It was the most popular model before the relational model. • This model is the same as the hierarchical model, the only difference is that a record can have more than one parent. It replaces the hierarchical tree with a graph. • Ex: IDS(Integrated Data Store) • It is an Early Network DB 10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 24
  • 25. Object-oriented Data Model • The real-world problems are more closely represented through the object-oriented data model. • In this model, both the data and relationship are present in a single structure known as an object 10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 25
  • 26. Entity-Relationship(E-R) Data Model • simply ER Model is a high-level data model diagram. In this model, we represent the real-world problem in the pictorial form to make it easy for the stakeholders to understand. 10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 26
  • 27. Relational Data Model • Relational Model is the most widely used model. In this model, the data is maintained in the form of a two- dimensional table. • All the information is stored in the form of row and columns. • The basic structure of a relational model is tables. So, the tables are also called relations in the relational model. 10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 27
  • 28. Relational Data Model 10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 28
  • 29. Types of Databases based on Data Model ▪Hierarchical Databases ▪Network Databases ▪Object-Oriented Databases ▪Relational Databases ▪Cloud Databases 10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 29
  • 30. Databases based on database Schema 1. Structured Databases(SQL Databases) ---uses Relational data model Ex: Oracle, MySQL ,MS SQL Server 2. Unstructured Databases(NoSQL Databases) Ex: MongoDB , CouchDB, Cassandra etc 10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 30
  • 31. Database Languages • Language used to communicate with Database --- SQL • SQL(Structured Query Language) is a query language to access databases. • SQL have 4 components 1.DDL (Data Definition Language) 2.DML (Data Manipulation Language) 3. DCL (Data Control Language) 4. TCL (Transaction Control Language) 10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 31
  • 32. DDL(Data Definition Language) •Data Definition Language (DDL) is a set of special Database commands that allows us to Create or define database and modify the structure and the metadata of the database. • These commands can be used to create, modify, and delete the database structures such as schema, tables etc. 10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 32
  • 33. DDL(Data Definition Language) Database Commands that comes under DDL are C,A,D C- Create A- Alter D- Drop Create COMMAND: used to create database table along with its schema(Structure of database) Syntax: Create table <table-name>(Attribute1 datatype,Attribute2 datatype,……..,AttributeN data type, Integrity Constraints1,2…N); 10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 33
  • 34. DDL(Data Definition Language) Ex: Create table student(name varchar(20),roll int(10),marks int(10)); 10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 34
  • 35. DDL(Data Definition Language) Alter Command: used to change the Database schema Syntax: ❖ Adding the column to the Table 1.alter table <table-name> add <column-name> <data-type>; ❖ Deleting the Column from the table 2. alter table <table-name> drop COLUMN <column- name>; 10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 35
  • 36. DDL(Data Definition Language) Alter Command: used to change the Database schema ❖ TO Rename the Column of the Table 3. Alter table <table-name> rename COLUMN <old- Column-name> to <new-Column-name>; ❖ TO Change the datatype of the column 4. Alter table <table-name> modify COLUMN <column- name> <new-datatype> 10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 36
  • 37. DDL(Data Definition Language) DROP Command: used to Completely delete the Structure of the table and its data. Syntax: drop table <table-name>; Ex: Drop table student; 10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 37
  • 38. DML(Data Manipulation Language) • DDL do changes to the Structure of the table where as DML works on data inside the table includes data insert , delete, update and retrieve the data. • Database commands comes under DML are S,I,D,U S-Select I- Insert D- Delete U- Update 10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 38
  • 39. DML(Data Manipulation Language) Select Command: is used to Retrieve the Data from the data base Syntax: ❖Select [attribute1,attribute2… or *] from <table- name>; ❖Select [attribute1,attribute2… or *] from <table- name> where <condition> Ex: select sname from student; select * from student; select * from student where roll=10 10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 39
  • 40. DML(Data Manipulation Language) Insert Command: used to place the data into the database table. Syntax: ❖insert into <table-name> values(value1,value2,…); ❖Insert into <table-name>(column1,2,…) values(value1,2,3….) Ex: insert into student values(‘Prasad’,10,’CSE’,’NIT-AP’); insert into student(name,roll) values(‘prasad’,10); 10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 40
  • 41. DML(Data Manipulation Language) Delete Command: used to delete the records of the database table based on condition but not delete table structure. Syntax: ❖delete from <table-name>; //to delete all records ❖delete from <table-name> where <condition>; //delete specific Ex: delete from student; delete from student where roll=10; //delete specific 10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 41
  • 42. DML(Data Manipulation Language) Update Command: used to replace any data in the database table. Syntax: //To update specific record ❖update <table-name> SET A1=V1,A2=V2….where <condition>; ❖update <table-name> SET A1=V1,A2=V2;//To update all records Note: A1,A2,…. Are Attributes and V1,V2,….. Are Values Ex: update student SET marks=70 where roll=10; update student SET marks=70; 10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 42
  • 43. Views of database 10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 43
  • 44. Views of database • A major purpose of a database system is to provide users with an abstract view of the data. That is, the system hides certain details of how the data are stored and maintained. • Physical level. The lowest level of abstraction describes how the data are actually stored. The physical level describes complex low-level data structures in detail. • Logical level. The next-higher level of abstraction describes what data are stored in the database, and what relationships exist among those data. 10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 44
  • 45. Views of database • View level: The highest level of abstraction describes only part of the entire database. Many users of the database system do not need all this information; instead, they need to access only a part of the database. • The system may provide many views for the same database. • Database systems have several schemas, partitioned according to the levels of abstraction. The physical schema describes the database design at the physical level, while the logical schema describes the database design at the logical level. A database may also have several schemas at the view level, sometimes called subschemas or External schema, that describe different views of the database 10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 45
  • 46. Data independence 10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 46
  • 47. Data Independence Physical Data Independence : • Physical Data Independence is defined as the ability to make changes in the structure of the lowest level of the DBMS without affecting the higher-level schemas. Hence, modification in the Physical level should not result in any changes in the Logical or View levels. Logical Data Independence • Logical Data Independence is defined as the ability to make changes in the structure of the middle level of the DBMS without affecting the highest-level schema or application programs. Hence, modification in the logical level should not result in any changes in the view levels or application programs. 10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 47
  • 48. Database Design • The database design process can be divided into six steps. • The ER model is most relevant to the first three steps. 1. Requirements Analysis: The very first step in designing a database application is to understand what data is to be stored in the database, what applications must be built on top of it, and what operations are most frequent and subject to performance requirements. 2. Conceptual Database Design: The information gathered in the requirements analysis step is used to develop a high-level description of the data to be stored in the database, along with the constraints known to hold over this data. This step is often carried out using the E-R(Entity-Relationship) model. 10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 48
  • 49. Database Design 3. Logical Database Design: We must choose a DBMS to implement our database design, and convert the conceptual database design into a database schema in the data model of the chosen DBMS. 4. Schema Refinement: T to analyze the collection of relations in our relational database schema to identify potential problems, and to refine it. We will use Normalization to refine database schema to avoid data redundancy. 5. Physical Database Design: Specifies how database tables exactly stores in the physical memory i.e collection of files stores as sequence of bytes. This step may simply involve building indexes on some tables and clustering some tables, to ensure that it meets desired performance criteria. 10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 49
  • 50. Database Design 6. Application and Security Design: Any software project that involves a DBMS must consider aspects of the application that go beyond the database itself. For each user, we must identify the parts of the database that must be accessible and the parts of the database that must not be accessible, and we must take steps to ensure that these access rules are enforced. 10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 50
  • 51. DBMS Architecture 10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 51
  • 52. DBMS Architecture Database Users and User Interfaces • There are four different types of database-system users, differentiated by the way they expect to interact with the system. Different types of user interfaces have been designed for the different types of users. • Naive users : are unsophisticated users who interact with the system by invoking one of the application programs that have been written previously. • For example, a clerk in the university who needs to add a new instructor to department A invokes a program called new hire. This program asks the clerk for the name of the new instructor, her new ID, the name of the department (that is, A), and the salary. 10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 52
  • 53. DBMS Architecture • Application programmers: are computer professionals who write application programs. Application programmers can choose from many tools to develop user interfaces. • Sophisticated users interact: with the system without writing programs. Instead, they form their requests either using a database query language or by using tools such as data analysis software. Analysts who submit queries to explore data in the database fall in this category. • Database Administrator: One of the main reasons for using DBMSs is to have central control of both the data and the programs that access those data. A person who has such central control over the system is called a database administrator (DBA). • The functions of a DBA include: • Schema definition. The DBA creates the original database schema • Storage structure and access-method definition. • Granting of authorization for data access 10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 53
  • 54. DBMS Architecture The Query Processor The query processor components include: • DDL interpreter, which interprets DDL statements and records the definitions in the data dictionary. • DML compiler, which translates DML statements in a query language into an evaluation plan consisting of low-level instructions that the query evaluation engine understands. A query can usually be translated into any of a number of alternative evaluation plans that all give the same result. The DML compiler also performs query optimization; that is, it picks the lowest cost evaluation plan from among the alternatives. • Query evaluation engine: which executes low-level instructions generated by the DML compiler 10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 54
  • 55. DBMS Architecture Storage Manager • The storage manager is the component of a database system 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 for the interaction with the file manager. The raw data are stored on the disk using the file system provided by the operating system. • The storage manager translates the various DML statements into low-level file-system commands. Thus, the storage manager is responsible for storing, retrieving, and updating data in the database. 10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 55
  • 56. DBMS Architecture The storage manager components include: • Authorization and integrity manager, which tests for the satisfaction of integrity constraints and checks the authority of users to access data. • Transaction manager, which ensures that the database remains in a consistent (correct) state despite system failures, and that concurrent transaction executions proceed without conflicting. • File manager, which manages the allocation of space on disk storage and the data structures used to represent information stored on disk. 10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 56
  • 57. DBMS Architecture • Buffer manager, which is responsible for fetching data from disk storage into main memory, and deciding what data to cache in main memory. The buffer manager is a critical part of the database system, since it enables the database to handle data sizes that are much larger than the size of main memory. The storage manager implements several data structures as part of the physical system implementation: • Data files, which store the database itself. • Data dictionary, which stores metadata about the structure of the database, in particular the schema of the database. • Indices, which can provide fast access to data items. Like the index in this textbook, 10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 57
  • 58. History of Databases • 1950s and early 1960s: Magnetic tapes were developed for data storage. • Late 1960s and 1970s: Widespread use of hard disks in the late 1960s changed the scenario for data processing greatly, since hard disks allowed direct access to data. • Charles Bachman was the first person to develop the Integrated Data Store (IDS) which was based on network data model for which he was inaugurated with the Turing Award (The most prestigious award which is equivalent to Nobel prize in the field of Computer Science.). It was developed in early 1960’s. • In the late 1960’s, IBM (International Business Machines Corporation) developed the Integrated Management System. It was developed based on the hierarchical database model. IBM Db2 also released which is RDBMS. • It was during the year 1970 that the relational database model was developed by Edgar F.Codd. Many of the database models we use today are relational based. It was considered the standardized database model from then 10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 58
  • 59. History of Databases • By the early 1980s, relational databases had become competitive with network and hierarchical database systems even in the area of performance. Relational databases were so easy to use that they eventually replaced network and hierarchical databases; • The relational model was still in use by many people in the market.Later during the same decade (1980’s), IBM developed the Structured Query Language (SQL) as a part of R project. It was declared as a standard language for the queries by ISO and ANSI. The Transaction Management Systems for processing transactions was also developed by James Gray for which he was felicitated the Turing Award. • 1990s: The major event of the 1990s was the explosive growth of the World WideWeb. Databases were deployed much more extensively than ever before. 10 January 2023 Department of CSE , NIT-AP Course Title: DBMS 59