SlideShare une entreprise Scribd logo
Chapter 1: Introduction
 Purpose of Database Systems
 View of Data
 Data Models
 Data Definition Language
 Data Manipulation Language
 Transaction Management
 Storage Management
 Database Administrator
 Database Users
 Overall System Structure
Database Management System (DBMS)
 Collection of interrelated data
 Set of programs to access the data
 DBMS contains information about a particular enterprise
 DBMS provides an environment that is both convenient
and efficient to use.
 Database Applications:
 Banking: all transactions
 Airlines: reservations, schedules
 Universities: registration, grades
 Sales: customers, products, purchases
 Manufacturing: production, inventory, orders, supply chain
 Human resources: employee records, salaries, tax deductions
 Databases touch all aspects of our lives
Purpose of Database System
 In the early days, database applications were
built on top of file systems
 Drawbacks of using file systems to store data:
 Data redundancy and inconsistency
 Multiple file formats, duplication of information in
different files
 Difficulty in accessing data
 Need to write a new program to carry out each new task
 Data isolation — multiple files and formats
 Integrity problems
 Integrity constraints (e.g. account balance > 0) become
part of program code
 Hard to add new constraints or change existing ones
Purpose of Database Systems (Cont.)
 Drawbacks of using file systems (cont.)
 Atomicity of updates
 Failures may leave database in an inconsistent state with partial
updates carried out
 E.g. transfer of funds from one account to another should either
complete or not happen at all
 Concurrent access by multiple users
 Concurrent accessed needed for performance
 Uncontrolled concurrent accesses can lead to inconsistencies
 E.g. two people reading a balance and updating it at the same
time
 Security problems
 Database systems offer solutions to all the above
problems
File Management Systems
 Uncontrolled Redundancy
 Inconsistent data
 Limited data sharing
 Difficulty in accessing data
 Security problems
 Huge data storage problem
 Excessive program maintenance
 Excessive data maintenance
Aruna (DSCASC)
Drawbacks 5
Applications of Database System
 Banking
 Airlines
 University
 Railways
 Finance
 Sales
 Telecommunication
 Pay roll system
 Manufacturing
Aruna (DSCASC)
7
Levels of Abstraction
 Physical level describes how a record (e.g., customer) is
stored.
 Logical level: describes data stored in database, and the
relationships among the data.
type customer = record
name : string;
street : string;
city : integer;
end;
 View level: application programs hide details of data
types. Views can also hide information (e.g., salary) for
security purposes.
9
Three-Schema Architecture
External Level
(describe the various
user views)
Conceptual Level
(describe the structure
and constraints for the
whole database)
Internal Level
(physical storage
structures and access
paths)
END USERS
External View
External View
Conceptual Schema
Internal Schema
Stored Database
. . .
Aruna (DSCASC)
10
Three-Schema Architecture
Example:
Customer Name
Customer Address
Customer Name
Customer Address
Customer SSN
Customer Name: String
Customer Address: String
Customer SSN: Number (PK)
Name: String length 25
Address: String length 40
SSN: Number length 10
Conceptual View
Internal View
External
View
Logical Record 1 Logical Record n
Customer SSN
--------------
Aruna (DSCASC)
11
Data Independence:
It is the capacity to change the schema
at one level of database system without having to
change the schema at the next higher level.
Two types of Data Independence:
• Logical Data Independence
• Physical Data Independence
Data Independence
Types of Data Independence
 Logical Data Independence :
The ability to modify or change the conceptual
(logical) schema without changing the external
scheme or application programs to be rewritten.
* Modifications are necessary whenever the
logical structure of the database is altered.
* The change in conceptual database may be
expanding the database by adding a new data field or
reducing the database by deleting fields.
Aruna (DSCASC)
12
Aruna (DSCASC)
13
 Physical Data Independence:
The ability to modify or change the internal (physical) schema without
changing the Conceptual (logical) schema.
* Modifications are necessary in this level to improve the performance.
* Changes to the internal schema is needed because some physical file had
to be reorganized, such as changing the access modes or paths for better
retrieval or updates.
Types of Data Independence
Instances and Schemas
 Similar to types and variables in programming languages
 Schema – the logical structure of the database
 e.g., the database consists of information about a set of customers and accounts
and the relationship between them)
 Analogous to type information of a variable in a program
 Physical schema: database design at the physical level
 Logical schema: database design at the logical level
 Instance – the actual content of the database at a particular point in time
 Analogous to the value of a variable
 Physical Data Independence – the ability to modify the physical
schema without changing the logical schema
 Applications depend on the logical schema
 In general, the interfaces between the various levels and components should be
well defined so that changes in some parts do not seriously influence others.
Data Models
 A collection of tools for describing
 data
 data relationships
 data semantics
 data constraints
 Entity-Relationship model
 Relational model
 Other models:
 object-oriented model
 semi-structured data models
 Older models: network model and hierarchical
model
16
History of Data Models
 Network Model
 Hierarchical Model
 Entity – Relationship Model
 Relational Model
 Object-Oriented Model
 Object-Relational Model
Aruna (DSCASC)
Entity-Relationship Model
Example of schema in the entity-relationship model
Entity Relationship Model (Cont.)
 E-R model of real world
 Entities (objects)
 E.g. customers, accounts, bank branch
 Relationships between entities
 E.g. Account A-101 is held by customer Johnson
 Relationship set depositor associates customers with accounts
 Widely used for database design
 Database design in E-R model usually converted to design in
the relational model (coming up next) which is used for
storage and processing
Relational Model
 Example of tabular data in the relational model
customer-
name
Customer-
id
customer-
street
customer-
city
account-
number
Johnson
Smith
Johnson
Jones
Smith
192-83-7465
019-28-3746
192-83-7465
321-12-3123
019-28-3746
Alma
North
Alma
Main
North
Palo Alto
Rye
Palo Alto
Harrison
Rye
A-101
A-215
A-201
A-217
A-201
Attributes
A Sample Relational Database
 Entity –Relationship Model
The E-R data model is based on real world that consists of a collection
of basic objects called entities and relationship among the objects.
 Entities are specific objects or things in the world that are
represented in the database.
Example: specific person, company, student, event.
 Attributes are properties used to describe an entity.
Example: an EMPLOYEE entity may have a Name, SSN, Address,
Designation,
Salary.
22
Data Models
Aruna (DSCASC)
23
Data Models
1) Relational Model:
- It represents a database as a collection of tables (Where each table can be stored
as a separate file, each of which has a number of columns with unique names).
- A table is a collection of rows and columns. Each column has a unique name.
- Each row is called a tuple, a column header as attributes, the table as relation.
Example:
NAME LOCATION CITY PHONE NO. ACCOUNT No.
ANAND KORAMANGALA BANGALORE 534278 401
VIKRAM AUDOGODI BANGALORE 546678 402
ACCOUNT NO. BALANCE
401 10000
402 5000
24
Data
Models
2) Network Model:
Data is represented as a collection of records and relationship
between data is represented by links which can be viewed as pointers.
The record in the database are organized as collection of arbitrary
graphs.
Example:
Publisher
Book
Author
Book Branch Branch
Network database structure
Network database model
Aruna (DSCASC)
25
Data Models
3) Hierarchical Data Model:
It is different from network model in the way that records are organized
into a tree like structure.
For eg. An organization might store information about an employee, such
as name, dep, sal. The organization might also store information about
employee’s family. The employee and the family data forms hierarchy.
Example:
DEPT
F1 F3 F4
F2
SD1 SD2 SD3 SD4
F – Faculty
S - Student
Aruna (DSCASC)
26
Data Models
4) Object Oriented Data Model:
It defines the database in terms of objects, their properties and their operations.
Objects with some structure and behavior.
 Support the basic elements of the object approach used in object oriented programming
languages like inheritance, use of methods, and encapsulation.
 Some object-oriented databases are designed to work well with object oriented
programming languages such as Java, C++, C# etc.
 OODBMS use exactly the same model as object-oriented programming languages.
Methods
Class
Operations of each class in terms of
predefined procedure.
Aruna (DSCASC)
Data Definition Language (DDL)
 Specification notation for defining the database
schema
 E.g.
create table account (
account-number char(10),
balance integer)
 DDL compiler generates a set of tables stored in
a data dictionary
 Data dictionary contains metadata (i.e., data
about data)
 database schema
 Data storage and definition language
 language in which the storage structure and access methods
used by the database system are specified
Data Manipulation Language (DML)
 Language for accessing and manipulating the data
organized by the appropriate data model
 DML also known as query language
 Two classes of languages
 Procedural – user specifies what data is required and how to
get those data
 Nonprocedural – user specifies what data is required without
specifying how to get those data
 SQL is the most widely used query language
SQL
 SQL: widely used non-procedural language
 E.g. find the name of the customer with customer-id 192-83-
7465
select customer.customer-name
from customer
where customer.customer-id = ‘192-83-7465’
 E.g. find the balances of all accounts held by the customer
with customer-id 192-83-7465
select account.balance
from depositor, account
where depositor.customer-id = ‘192-83-7465’
and
depositor.account-number =
account.account-number
 Application programs generally access databases
through one of
 Language extensions to allow embedded SQL
 Application program interface (e.g. ODBC/JDBC) which allow
SQL queries to be sent to a database
 Database administrators (DBA):
Responsible for authorizing access to the database, for
co-coordinating and monitoring its use, acquiring software, and hardware
resources, controlling its use and monitoring efficiency of operations.
Functions of DBA:
• Defining the conceptual schema.
• Defining the physical schema.
• Defining the security and Integrity constraints.
• Defining Backup and Recovery procedures.
• Storage structures and access methods definition.
• Granting of authorization for data access.
Actors on the scene
Aruna (DSCASC)
31
 Database Designers:
Responsible to define the content, the structure, the
constraints, and functions or transactions against the database.
They must communicate with the end-users and understand their
needs.
 End-users:
They use the data for queries, reports and some of them
actually update the database content.
Actors on the scene
Aruna (DSCASC)
32
Different types of end users:
1) Casual: Access database occasionally when needed
2) Naïve or Parametric: They make up a large section of the end-user
population.
They use previously well-defined functions in the form of “canned transactions”
(using Queries and Updates) against the database.
OR
Users who interact with the system by using the application programs that
have previously written, they are unsophisticated users.
Examples A bank-tellers or reservation clerks who do this activity for an entire
shift of operations.
Categories of End-users
Aruna (DSCASC)
33
Sophisticated:
- These include business analysts, scientists, engineers, others thoroughly
familiar with the system capabilities.
- Many use tools in the form of software packages that work closely with the
stored database.
- This users interact with the system without writing programs. Instead they
form their database query.
Stand-alone:
Mostly maintain personal databases using ready-to-use packaged applications.
An example is a tax program user that creates his or her own internal database
Categories of End-users
Aruna (DSCASC)
34
Database Administrator
 Coordinates all the activities of the
database system; the database
administrator has a good understanding of
the enterprise’s information resources and
needs.
 Database administrator's duties include:
 Schema definition
 Storage structure and access method definition
 Schema and physical organization modification
 Granting user authority to access the database
 Specifying integrity constraints
 Acting as liaison with users
Transaction Management
 A transaction is a collection of operations that
performs a single logical function in a database
application
 Transaction-management component ensures that
the database remains in a consistent (correct) state
despite system failures (e.g., power failures and
operating system crashes) and transaction failures.
 Concurrency-control manager controls the
interaction among the concurrent transactions, to
ensure the consistency of the database.
Storage Management
 Storage manager is a program module that provides
the interface between the low-level data stored in the
database and the application programs and queries
submitted to the system.
 The storage manager is responsible to the following
tasks:
 interaction with the file manager
 efficient storing, retrieving and updating of data
Overall System Structure
Application Architectures
Two-tier architecture: E.g. client programs using ODBC/JDBC to
communicate with a database
Three-tier architecture: E.g. web-based applications, and
applications built using “middleware”

Contenu connexe

Tendances

Er model ppt
Er model pptEr model ppt
Er model ppt
Pihu Goel
 
Database, Lecture-1.ppt
Database, Lecture-1.pptDatabase, Lecture-1.ppt
Database, Lecture-1.ppt
MatshushimaSumaya
 
Complete dbms notes
Complete dbms notesComplete dbms notes
Complete dbms notes
Tanya Makkar
 
Dbms relational model
Dbms relational modelDbms relational model
Dbms relational model
Chirag vasava
 
Database Management System ppt
Database Management System pptDatabase Management System ppt
Database Management System ppt
OECLIB Odisha Electronics Control Library
 
Dbms 11: Relational Algebra
Dbms 11: Relational AlgebraDbms 11: Relational Algebra
Dbms 11: Relational Algebra
Amiya9439793168
 
2 database system concepts and architecture
2 database system concepts and architecture2 database system concepts and architecture
2 database system concepts and architecture
Kumar
 
Dbms Introduction and Basics
Dbms Introduction and BasicsDbms Introduction and Basics
Dbms Introduction and Basics
SHIKHA GAUTAM
 
data modeling and models
data modeling and modelsdata modeling and models
data modeling and models
sabah N
 
Relational algebra in dbms
Relational algebra in dbmsRelational algebra in dbms
Relational algebra in dbms
Vignesh Saravanan
 
Database Management System
Database Management SystemDatabase Management System
Database Management System
Nishant Munjal
 
Database Concepts and Components
Database Concepts and ComponentsDatabase Concepts and Components
Database Concepts and Components
RIAH ENCARNACION
 
Relational Data Model Introduction
Relational Data Model IntroductionRelational Data Model Introduction
Relational Data Model Introduction
Nishant Munjal
 
Presentation on Database management system
Presentation on Database management systemPresentation on Database management system
Presentation on Database management system
Prerana Bhattarai
 
Database Management System Introduction
Database Management System IntroductionDatabase Management System Introduction
Database Management System Introduction
Smriti Jain
 
Memory organization (Computer architecture)
Memory organization (Computer architecture)Memory organization (Computer architecture)
Memory organization (Computer architecture)
Sandesh Jonchhe
 
Functional dependencies in Database Management System
Functional dependencies in Database Management SystemFunctional dependencies in Database Management System
Functional dependencies in Database Management System
Kevin Jadiya
 
Interface specification
Interface specificationInterface specification
Interface specification
maliksiddique1
 
1.4 data independence
1.4 data independence1.4 data independence
1.4 data independence
BHARATH KUMAR
 
DBMS - Database Management System
DBMS - Database Management System DBMS - Database Management System
DBMS - Database Management System
Krishna Patel
 

Tendances (20)

Er model ppt
Er model pptEr model ppt
Er model ppt
 
Database, Lecture-1.ppt
Database, Lecture-1.pptDatabase, Lecture-1.ppt
Database, Lecture-1.ppt
 
Complete dbms notes
Complete dbms notesComplete dbms notes
Complete dbms notes
 
Dbms relational model
Dbms relational modelDbms relational model
Dbms relational model
 
Database Management System ppt
Database Management System pptDatabase Management System ppt
Database Management System ppt
 
Dbms 11: Relational Algebra
Dbms 11: Relational AlgebraDbms 11: Relational Algebra
Dbms 11: Relational Algebra
 
2 database system concepts and architecture
2 database system concepts and architecture2 database system concepts and architecture
2 database system concepts and architecture
 
Dbms Introduction and Basics
Dbms Introduction and BasicsDbms Introduction and Basics
Dbms Introduction and Basics
 
data modeling and models
data modeling and modelsdata modeling and models
data modeling and models
 
Relational algebra in dbms
Relational algebra in dbmsRelational algebra in dbms
Relational algebra in dbms
 
Database Management System
Database Management SystemDatabase Management System
Database Management System
 
Database Concepts and Components
Database Concepts and ComponentsDatabase Concepts and Components
Database Concepts and Components
 
Relational Data Model Introduction
Relational Data Model IntroductionRelational Data Model Introduction
Relational Data Model Introduction
 
Presentation on Database management system
Presentation on Database management systemPresentation on Database management system
Presentation on Database management system
 
Database Management System Introduction
Database Management System IntroductionDatabase Management System Introduction
Database Management System Introduction
 
Memory organization (Computer architecture)
Memory organization (Computer architecture)Memory organization (Computer architecture)
Memory organization (Computer architecture)
 
Functional dependencies in Database Management System
Functional dependencies in Database Management SystemFunctional dependencies in Database Management System
Functional dependencies in Database Management System
 
Interface specification
Interface specificationInterface specification
Interface specification
 
1.4 data independence
1.4 data independence1.4 data independence
1.4 data independence
 
DBMS - Database Management System
DBMS - Database Management System DBMS - Database Management System
DBMS - Database Management System
 

Similaire à dbms notes.ppt

Unit01 dbms
Unit01 dbmsUnit01 dbms
Unit01 dbms
arnold 7490
 
Dbms
DbmsDbms
Dbms
saurav-IT
 
21UCAC 41 Database Management System.ppt
21UCAC 41 Database Management System.ppt21UCAC 41 Database Management System.ppt
21UCAC 41 Database Management System.ppt
ssuser7f90ae
 
Ch1
Ch1Ch1
Ch1
CAG
 
Ch1
Ch1Ch1
Ch1 2
Ch1 2Ch1 2
DBMS
DBMSDBMS
dbms-1.pptx
dbms-1.pptxdbms-1.pptx
Ch1- Introduction to dbms
Ch1- Introduction to dbmsCh1- Introduction to dbms
Ch1- Introduction to dbms
Shakila Mahjabin
 
database introductoin optimization1-app6891.pdf
database introductoin optimization1-app6891.pdfdatabase introductoin optimization1-app6891.pdf
database introductoin optimization1-app6891.pdf
parveen204931475
 
Introduction to Database
Introduction to DatabaseIntroduction to Database
Introduction to Database
Siti Ismail
 
27 fcs157al2
27 fcs157al227 fcs157al2
27 fcs157al2
CHANDRA BHUSHAN
 
Introduction to Database, Purpose of Data, Data models, Components of Database
Introduction to Database, Purpose of Data, Data models, Components of DatabaseIntroduction to Database, Purpose of Data, Data models, Components of Database
Introduction to Database, Purpose of Data, Data models, Components of Database
kasthurimukila
 
Database Systems Concepts, 5th Ed
Database Systems Concepts, 5th EdDatabase Systems Concepts, 5th Ed
Database Systems Concepts, 5th Ed
Daniel Francisco Tamayo
 
M.sc. engg (ict) admission guide database management system 4
M.sc. engg (ict) admission guide   database management system 4M.sc. engg (ict) admission guide   database management system 4
M.sc. engg (ict) admission guide database management system 4
Syed Ariful Islam Emon
 
Lecture 1 to 3intro to normalization in database
Lecture 1 to 3intro to  normalization in databaseLecture 1 to 3intro to  normalization in database
Lecture 1 to 3intro to normalization in database
maqsoodahmedbscsfkhp
 
Dbms unit01
Dbms unit01Dbms unit01
Dbms unit01
Ila Chandana
 
Ch-1-Introduction-to-Database.pdf
Ch-1-Introduction-to-Database.pdfCh-1-Introduction-to-Database.pdf
Ch-1-Introduction-to-Database.pdf
MrjJoker1
 
Dbms 1
Dbms 1Dbms 1
Dbms 1
kartik_chell
 
Database Management System, Lecture-1
Database Management System, Lecture-1Database Management System, Lecture-1
Database Management System, Lecture-1
Sonia Mim
 

Similaire à dbms notes.ppt (20)

Unit01 dbms
Unit01 dbmsUnit01 dbms
Unit01 dbms
 
Dbms
DbmsDbms
Dbms
 
21UCAC 41 Database Management System.ppt
21UCAC 41 Database Management System.ppt21UCAC 41 Database Management System.ppt
21UCAC 41 Database Management System.ppt
 
Ch1
Ch1Ch1
Ch1
 
Ch1
Ch1Ch1
Ch1
 
Ch1 2
Ch1 2Ch1 2
Ch1 2
 
DBMS
DBMSDBMS
DBMS
 
dbms-1.pptx
dbms-1.pptxdbms-1.pptx
dbms-1.pptx
 
Ch1- Introduction to dbms
Ch1- Introduction to dbmsCh1- Introduction to dbms
Ch1- Introduction to dbms
 
database introductoin optimization1-app6891.pdf
database introductoin optimization1-app6891.pdfdatabase introductoin optimization1-app6891.pdf
database introductoin optimization1-app6891.pdf
 
Introduction to Database
Introduction to DatabaseIntroduction to Database
Introduction to Database
 
27 fcs157al2
27 fcs157al227 fcs157al2
27 fcs157al2
 
Introduction to Database, Purpose of Data, Data models, Components of Database
Introduction to Database, Purpose of Data, Data models, Components of DatabaseIntroduction to Database, Purpose of Data, Data models, Components of Database
Introduction to Database, Purpose of Data, Data models, Components of Database
 
Database Systems Concepts, 5th Ed
Database Systems Concepts, 5th EdDatabase Systems Concepts, 5th Ed
Database Systems Concepts, 5th Ed
 
M.sc. engg (ict) admission guide database management system 4
M.sc. engg (ict) admission guide   database management system 4M.sc. engg (ict) admission guide   database management system 4
M.sc. engg (ict) admission guide database management system 4
 
Lecture 1 to 3intro to normalization in database
Lecture 1 to 3intro to  normalization in databaseLecture 1 to 3intro to  normalization in database
Lecture 1 to 3intro to normalization in database
 
Dbms unit01
Dbms unit01Dbms unit01
Dbms unit01
 
Ch-1-Introduction-to-Database.pdf
Ch-1-Introduction-to-Database.pdfCh-1-Introduction-to-Database.pdf
Ch-1-Introduction-to-Database.pdf
 
Dbms 1
Dbms 1Dbms 1
Dbms 1
 
Database Management System, Lecture-1
Database Management System, Lecture-1Database Management System, Lecture-1
Database Management System, Lecture-1
 

Plus de Ranjit273515

dbms keys.pptx
dbms keys.pptxdbms keys.pptx
dbms keys.pptx
Ranjit273515
 
41- Ranjit CE 4th Sem.(P and I Notes).pdf
41- Ranjit CE 4th Sem.(P and I Notes).pdf41- Ranjit CE 4th Sem.(P and I Notes).pdf
41- Ranjit CE 4th Sem.(P and I Notes).pdf
Ranjit273515
 
question3.pdf
question3.pdfquestion3.pdf
question3.pdf
Ranjit273515
 
question3.pdf
question3.pdfquestion3.pdf
question3.pdf
Ranjit273515
 
question2.pdf
question2.pdfquestion2.pdf
question2.pdf
Ranjit273515
 
SQL.ppt
SQL.pptSQL.ppt
SQL.ppt
Ranjit273515
 

Plus de Ranjit273515 (6)

dbms keys.pptx
dbms keys.pptxdbms keys.pptx
dbms keys.pptx
 
41- Ranjit CE 4th Sem.(P and I Notes).pdf
41- Ranjit CE 4th Sem.(P and I Notes).pdf41- Ranjit CE 4th Sem.(P and I Notes).pdf
41- Ranjit CE 4th Sem.(P and I Notes).pdf
 
question3.pdf
question3.pdfquestion3.pdf
question3.pdf
 
question3.pdf
question3.pdfquestion3.pdf
question3.pdf
 
question2.pdf
question2.pdfquestion2.pdf
question2.pdf
 
SQL.ppt
SQL.pptSQL.ppt
SQL.ppt
 

Dernier

Certificates - Mahmoud Mohamed Moursi Ahmed
Certificates - Mahmoud Mohamed Moursi AhmedCertificates - Mahmoud Mohamed Moursi Ahmed
Certificates - Mahmoud Mohamed Moursi Ahmed
Mahmoud Morsy
 
Generative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of contentGenerative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of content
Hitesh Mohapatra
 
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.pptUnit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
KrishnaveniKrishnara1
 
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Sinan KOZAK
 
Introduction to AI Safety (public presentation).pptx
Introduction to AI Safety (public presentation).pptxIntroduction to AI Safety (public presentation).pptx
Introduction to AI Safety (public presentation).pptx
MiscAnnoy1
 
john krisinger-the science and history of the alcoholic beverage.pptx
john krisinger-the science and history of the alcoholic beverage.pptxjohn krisinger-the science and history of the alcoholic beverage.pptx
john krisinger-the science and history of the alcoholic beverage.pptx
Madan Karki
 
Engineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdfEngineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdf
abbyasa1014
 
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
IJECEIAES
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
Madan Karki
 
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
Yasser Mahgoub
 
Material for memory and display system h
Material for memory and display system hMaterial for memory and display system h
Material for memory and display system h
gowrishankartb2005
 
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
171ticu
 
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
ydzowc
 
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
171ticu
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
KrishnaveniKrishnara1
 
Welding Metallurgy Ferrous Materials.pdf
Welding Metallurgy Ferrous Materials.pdfWelding Metallurgy Ferrous Materials.pdf
Welding Metallurgy Ferrous Materials.pdf
AjmalKhan50578
 
Data Driven Maintenance | UReason Webinar
Data Driven Maintenance | UReason WebinarData Driven Maintenance | UReason Webinar
Data Driven Maintenance | UReason Webinar
UReason
 
The Python for beginners. This is an advance computer language.
The Python for beginners. This is an advance computer language.The Python for beginners. This is an advance computer language.
The Python for beginners. This is an advance computer language.
sachin chaurasia
 
Properties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptxProperties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptx
MDSABBIROJJAMANPAYEL
 
International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...
gerogepatton
 

Dernier (20)

Certificates - Mahmoud Mohamed Moursi Ahmed
Certificates - Mahmoud Mohamed Moursi AhmedCertificates - Mahmoud Mohamed Moursi Ahmed
Certificates - Mahmoud Mohamed Moursi Ahmed
 
Generative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of contentGenerative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of content
 
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.pptUnit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
 
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
 
Introduction to AI Safety (public presentation).pptx
Introduction to AI Safety (public presentation).pptxIntroduction to AI Safety (public presentation).pptx
Introduction to AI Safety (public presentation).pptx
 
john krisinger-the science and history of the alcoholic beverage.pptx
john krisinger-the science and history of the alcoholic beverage.pptxjohn krisinger-the science and history of the alcoholic beverage.pptx
john krisinger-the science and history of the alcoholic beverage.pptx
 
Engineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdfEngineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdf
 
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
 
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
 
Material for memory and display system h
Material for memory and display system hMaterial for memory and display system h
Material for memory and display system h
 
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
 
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
 
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
 
Welding Metallurgy Ferrous Materials.pdf
Welding Metallurgy Ferrous Materials.pdfWelding Metallurgy Ferrous Materials.pdf
Welding Metallurgy Ferrous Materials.pdf
 
Data Driven Maintenance | UReason Webinar
Data Driven Maintenance | UReason WebinarData Driven Maintenance | UReason Webinar
Data Driven Maintenance | UReason Webinar
 
The Python for beginners. This is an advance computer language.
The Python for beginners. This is an advance computer language.The Python for beginners. This is an advance computer language.
The Python for beginners. This is an advance computer language.
 
Properties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptxProperties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptx
 
International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...
 

dbms notes.ppt

  • 1. Chapter 1: Introduction  Purpose of Database Systems  View of Data  Data Models  Data Definition Language  Data Manipulation Language  Transaction Management  Storage Management  Database Administrator  Database Users  Overall System Structure
  • 2. Database Management System (DBMS)  Collection of interrelated data  Set of programs to access the data  DBMS contains information about a particular enterprise  DBMS provides an environment that is both convenient and efficient to use.  Database Applications:  Banking: all transactions  Airlines: reservations, schedules  Universities: registration, grades  Sales: customers, products, purchases  Manufacturing: production, inventory, orders, supply chain  Human resources: employee records, salaries, tax deductions  Databases touch all aspects of our lives
  • 3. Purpose of Database System  In the early days, database applications were built on top of file systems  Drawbacks of using file systems to store data:  Data redundancy and inconsistency  Multiple file formats, duplication of information in different files  Difficulty in accessing data  Need to write a new program to carry out each new task  Data isolation — multiple files and formats  Integrity problems  Integrity constraints (e.g. account balance > 0) become part of program code  Hard to add new constraints or change existing ones
  • 4. Purpose of Database Systems (Cont.)  Drawbacks of using file systems (cont.)  Atomicity of updates  Failures may leave database in an inconsistent state with partial updates carried out  E.g. transfer of funds from one account to another should either complete or not happen at all  Concurrent access by multiple users  Concurrent accessed needed for performance  Uncontrolled concurrent accesses can lead to inconsistencies  E.g. two people reading a balance and updating it at the same time  Security problems  Database systems offer solutions to all the above problems
  • 5. File Management Systems  Uncontrolled Redundancy  Inconsistent data  Limited data sharing  Difficulty in accessing data  Security problems  Huge data storage problem  Excessive program maintenance  Excessive data maintenance Aruna (DSCASC) Drawbacks 5
  • 6.
  • 7. Applications of Database System  Banking  Airlines  University  Railways  Finance  Sales  Telecommunication  Pay roll system  Manufacturing Aruna (DSCASC) 7
  • 8. Levels of Abstraction  Physical level describes how a record (e.g., customer) is stored.  Logical level: describes data stored in database, and the relationships among the data. type customer = record name : string; street : string; city : integer; end;  View level: application programs hide details of data types. Views can also hide information (e.g., salary) for security purposes.
  • 9. 9 Three-Schema Architecture External Level (describe the various user views) Conceptual Level (describe the structure and constraints for the whole database) Internal Level (physical storage structures and access paths) END USERS External View External View Conceptual Schema Internal Schema Stored Database . . .
  • 10. Aruna (DSCASC) 10 Three-Schema Architecture Example: Customer Name Customer Address Customer Name Customer Address Customer SSN Customer Name: String Customer Address: String Customer SSN: Number (PK) Name: String length 25 Address: String length 40 SSN: Number length 10 Conceptual View Internal View External View Logical Record 1 Logical Record n Customer SSN --------------
  • 11. Aruna (DSCASC) 11 Data Independence: It is the capacity to change the schema at one level of database system without having to change the schema at the next higher level. Two types of Data Independence: • Logical Data Independence • Physical Data Independence Data Independence
  • 12. Types of Data Independence  Logical Data Independence : The ability to modify or change the conceptual (logical) schema without changing the external scheme or application programs to be rewritten. * Modifications are necessary whenever the logical structure of the database is altered. * The change in conceptual database may be expanding the database by adding a new data field or reducing the database by deleting fields. Aruna (DSCASC) 12
  • 13. Aruna (DSCASC) 13  Physical Data Independence: The ability to modify or change the internal (physical) schema without changing the Conceptual (logical) schema. * Modifications are necessary in this level to improve the performance. * Changes to the internal schema is needed because some physical file had to be reorganized, such as changing the access modes or paths for better retrieval or updates. Types of Data Independence
  • 14. Instances and Schemas  Similar to types and variables in programming languages  Schema – the logical structure of the database  e.g., the database consists of information about a set of customers and accounts and the relationship between them)  Analogous to type information of a variable in a program  Physical schema: database design at the physical level  Logical schema: database design at the logical level  Instance – the actual content of the database at a particular point in time  Analogous to the value of a variable  Physical Data Independence – the ability to modify the physical schema without changing the logical schema  Applications depend on the logical schema  In general, the interfaces between the various levels and components should be well defined so that changes in some parts do not seriously influence others.
  • 15. Data Models  A collection of tools for describing  data  data relationships  data semantics  data constraints  Entity-Relationship model  Relational model  Other models:  object-oriented model  semi-structured data models  Older models: network model and hierarchical model
  • 16. 16 History of Data Models  Network Model  Hierarchical Model  Entity – Relationship Model  Relational Model  Object-Oriented Model  Object-Relational Model Aruna (DSCASC)
  • 17.
  • 18. Entity-Relationship Model Example of schema in the entity-relationship model
  • 19. Entity Relationship Model (Cont.)  E-R model of real world  Entities (objects)  E.g. customers, accounts, bank branch  Relationships between entities  E.g. Account A-101 is held by customer Johnson  Relationship set depositor associates customers with accounts  Widely used for database design  Database design in E-R model usually converted to design in the relational model (coming up next) which is used for storage and processing
  • 20. Relational Model  Example of tabular data in the relational model customer- name Customer- id customer- street customer- city account- number Johnson Smith Johnson Jones Smith 192-83-7465 019-28-3746 192-83-7465 321-12-3123 019-28-3746 Alma North Alma Main North Palo Alto Rye Palo Alto Harrison Rye A-101 A-215 A-201 A-217 A-201 Attributes
  • 22.  Entity –Relationship Model The E-R data model is based on real world that consists of a collection of basic objects called entities and relationship among the objects.  Entities are specific objects or things in the world that are represented in the database. Example: specific person, company, student, event.  Attributes are properties used to describe an entity. Example: an EMPLOYEE entity may have a Name, SSN, Address, Designation, Salary. 22 Data Models Aruna (DSCASC)
  • 23. 23 Data Models 1) Relational Model: - It represents a database as a collection of tables (Where each table can be stored as a separate file, each of which has a number of columns with unique names). - A table is a collection of rows and columns. Each column has a unique name. - Each row is called a tuple, a column header as attributes, the table as relation. Example: NAME LOCATION CITY PHONE NO. ACCOUNT No. ANAND KORAMANGALA BANGALORE 534278 401 VIKRAM AUDOGODI BANGALORE 546678 402 ACCOUNT NO. BALANCE 401 10000 402 5000
  • 24. 24 Data Models 2) Network Model: Data is represented as a collection of records and relationship between data is represented by links which can be viewed as pointers. The record in the database are organized as collection of arbitrary graphs. Example: Publisher Book Author Book Branch Branch Network database structure Network database model Aruna (DSCASC)
  • 25. 25 Data Models 3) Hierarchical Data Model: It is different from network model in the way that records are organized into a tree like structure. For eg. An organization might store information about an employee, such as name, dep, sal. The organization might also store information about employee’s family. The employee and the family data forms hierarchy. Example: DEPT F1 F3 F4 F2 SD1 SD2 SD3 SD4 F – Faculty S - Student Aruna (DSCASC)
  • 26. 26 Data Models 4) Object Oriented Data Model: It defines the database in terms of objects, their properties and their operations. Objects with some structure and behavior.  Support the basic elements of the object approach used in object oriented programming languages like inheritance, use of methods, and encapsulation.  Some object-oriented databases are designed to work well with object oriented programming languages such as Java, C++, C# etc.  OODBMS use exactly the same model as object-oriented programming languages. Methods Class Operations of each class in terms of predefined procedure. Aruna (DSCASC)
  • 27. Data Definition Language (DDL)  Specification notation for defining the database schema  E.g. create table account ( account-number char(10), balance integer)  DDL compiler generates a set of tables stored in a data dictionary  Data dictionary contains metadata (i.e., data about data)  database schema  Data storage and definition language  language in which the storage structure and access methods used by the database system are specified
  • 28. Data Manipulation Language (DML)  Language for accessing and manipulating the data organized by the appropriate data model  DML also known as query language  Two classes of languages  Procedural – user specifies what data is required and how to get those data  Nonprocedural – user specifies what data is required without specifying how to get those data  SQL is the most widely used query language
  • 29. SQL  SQL: widely used non-procedural language  E.g. find the name of the customer with customer-id 192-83- 7465 select customer.customer-name from customer where customer.customer-id = ‘192-83-7465’  E.g. find the balances of all accounts held by the customer with customer-id 192-83-7465 select account.balance from depositor, account where depositor.customer-id = ‘192-83-7465’ and depositor.account-number = account.account-number
  • 30.  Application programs generally access databases through one of  Language extensions to allow embedded SQL  Application program interface (e.g. ODBC/JDBC) which allow SQL queries to be sent to a database
  • 31.  Database administrators (DBA): Responsible for authorizing access to the database, for co-coordinating and monitoring its use, acquiring software, and hardware resources, controlling its use and monitoring efficiency of operations. Functions of DBA: • Defining the conceptual schema. • Defining the physical schema. • Defining the security and Integrity constraints. • Defining Backup and Recovery procedures. • Storage structures and access methods definition. • Granting of authorization for data access. Actors on the scene Aruna (DSCASC) 31
  • 32.  Database Designers: Responsible to define the content, the structure, the constraints, and functions or transactions against the database. They must communicate with the end-users and understand their needs.  End-users: They use the data for queries, reports and some of them actually update the database content. Actors on the scene Aruna (DSCASC) 32
  • 33. Different types of end users: 1) Casual: Access database occasionally when needed 2) Naïve or Parametric: They make up a large section of the end-user population. They use previously well-defined functions in the form of “canned transactions” (using Queries and Updates) against the database. OR Users who interact with the system by using the application programs that have previously written, they are unsophisticated users. Examples A bank-tellers or reservation clerks who do this activity for an entire shift of operations. Categories of End-users Aruna (DSCASC) 33
  • 34. Sophisticated: - These include business analysts, scientists, engineers, others thoroughly familiar with the system capabilities. - Many use tools in the form of software packages that work closely with the stored database. - This users interact with the system without writing programs. Instead they form their database query. Stand-alone: Mostly maintain personal databases using ready-to-use packaged applications. An example is a tax program user that creates his or her own internal database Categories of End-users Aruna (DSCASC) 34
  • 35. Database Administrator  Coordinates all the activities of the database system; the database administrator has a good understanding of the enterprise’s information resources and needs.  Database administrator's duties include:  Schema definition  Storage structure and access method definition  Schema and physical organization modification  Granting user authority to access the database  Specifying integrity constraints  Acting as liaison with users
  • 36. Transaction Management  A transaction is a collection of operations that performs a single logical function in a database application  Transaction-management component ensures that the database remains in a consistent (correct) state despite system failures (e.g., power failures and operating system crashes) and transaction failures.  Concurrency-control manager controls the interaction among the concurrent transactions, to ensure the consistency of the database.
  • 37. Storage Management  Storage manager is a program module that provides the interface between the low-level data stored in the database and the application programs and queries submitted to the system.  The storage manager is responsible to the following tasks:  interaction with the file manager  efficient storing, retrieving and updating of data
  • 39. Application Architectures Two-tier architecture: E.g. client programs using ODBC/JDBC to communicate with a database Three-tier architecture: E.g. web-based applications, and applications built using “middleware”