SlideShare a Scribd company logo
1
Database Systems
I F F A T A R A
Dept. of Geomatics
Geographic Information System
GOM-311
2
What is DBMS?
 Need for information management
 A very large, integrated collection of data.
 Models real-world enterprise.
– Entities (e.g., students, courses)
– Relationships (e.g., John is taking CS662)
 A Database Management System (DBMS) is a
software package designed to store and
manage databases.
3
Why Use a DBMS?
 Data independence and efficient access.
 Data integrity and security.
 Uniform data administration.
 Concurrent access, recovery from crashes.
 Replication control
 Reduced application development time.
4
Why Study Databases??
 Shift from computation to information
– at the “low end”: access to physical world
– at the “high end”: scientific applications
 Datasets increasing in diversity and volume.
– Digital libraries, interactive video, Human
Genome project, e-commerce, sensor networks
– ... need for DBMS/data services exploding
 DBMS encompasses several areas of CS
– OS, languages, theory, AI, multimedia, logic
5
Data Models
 A data model is a collection of concepts for
describing data.
 A schema is a description of a particular
collection of data, using the a given data
model.
 The relational model of data is the most widely
used model today.
– Main concept: relation, basically a table with rows
and columns.
– Every relation has a schema, which describes the
columns, or fields.
6
Levels of Abstraction
 Many views, single
conceptual (logical) schema
and physical schema.
– Views describe how users
see the data.
– Conceptual schema defines
logical structure
– Physical schema describes
the files and indexes used.
* Schemas are defined using DDL; data is modified/queried using DML.
7
Three-schema approach
8
Example: University Database
 Conceptual schema:
– Students(sid: string, name: string, login: string,
age: integer, gpa:real)
– Courses(cid: string, cname:string, credits:integer)
– Enrolled(sid:string, cid:string, grade:string)
 Physical schema:
– Relations stored as unordered files.
– Index on first column of Students.
 External Schema (View):
– Course_info(cid:string, enrollment:integer)
9
Data Independence
 Applications insulated from how data is
structured and stored.
 Logical data independence: Protection from
changes in logical structure of data.
 Physical data independence: Protection from
changes in physical structure of data.
* One of the most important benefits of using a DBMS!
10
Concurrency Control
 Concurrent execution of user programs is
essential for good DBMS performance.
– Because disk accesses are frequent, and relatively
slow, it is important to keep the CPU humming by
working on several user programs concurrently.
 Interleaving actions of different user programs
can lead to inconsistency: e.g., check is cleared
while account balance is being computed.
 DBMS ensures such problems don’t arise: users
can pretend they are using a single-user system.
11
Transaction: An Execution Unit of a DB
 Key concept is transaction, which is an atomic
sequence of database actions (reads/writes).
 Each transaction, executed completely, must leave
the DB in a consistent state if DB is consistent when
the transaction begins.
– Users can specify some simple integrity constraints on
the data, and the DBMS will enforce these constraints.
– Beyond this, the DBMS does not really understand the
semantics of the data. (e.g., it does not understand how
the interest on a bank account is computed). Why not?
– Thus, ensuring that a transaction (run alone) preserves
consistency is ultimately the user’s responsibility!
12
Scheduling Concurrent Transactions
 DBMS ensures that execution of {T1, ... , Tn} is
equivalent to some serial execution T1’ ... Tn’.
– Before reading/writing an object, a transaction requests
a lock on the object, and waits till the DBMS gives it the
lock. All locks are released at the end of the transaction.
(Strict 2PL locking protocol.)
– Idea: If an action of Ti (say, writing X) affects Tj (which
perhaps reads X), one of them, say Ti, will obtain the
lock on X first and Tj is forced to wait until Ti completes;
this effectively orders the transactions.
– What if Tj already has a lock on Y and Ti later requests a
lock on Y? What is it called? What will happen?
13
Ensuring Atomicity
 DBMS ensures atomicity (all-or-nothing property)
even if system crashes in the middle of a Xact.
 Idea: Keep a log (history) of all actions carried out
by the DBMS while executing a set of Xacts:
– Before a change is made to the database, the
corresponding log entry is forced to a safe location.
(WAL protocol.)
– After a crash, the effects of partially executed
transactions are undone using the log. (Thanks to WAL, if
log entry wasn’t saved before the crash, corresponding
change was not applied to database!)
14
The Log
 The following actions are recorded in the log:
– Ti writes an object: the old value and the new value.
u Log record must go to disk before the changed page!
– Ti commits/aborts: a log record indicating this action.
 Log records chained together by Xact id, so it’s easy to
undo a specific Xact (e.g., to resolve a deadlock).
 Log is often duplexed and archived on “stable” storage.
 All log related activities (and in fact, all CC related
activities such as lock/unlock, dealing with deadlocks
etc.) are handled transparently by the DBMS.
15
Databases make these folks happy ...
 End users and DBMS vendors
 DB application programmers
– e.g. webmasters
 Database administrator (DBA)
– Designs logical /physical schemas
– Handles security and authorization
– Data availability, crash recovery
– Database tuning as needs evolve
Must understand how a DBMS works!
16
Structure of a DBMS
 A typical DBMS has a
layered architecture.
 The figure does not
show the concurrency
control and recovery
components.
 This is one of several
possible architectures;
each system has its own
variations.
Query Optimization
and Execution
Relational Operators
Files and Access Methods
Buffer Management
Disk Space Management
DB
These layers
must consider
concurrency
control and
recovery
17
Summary
 DBMS used to maintain, query large datasets.
 Benefits include recovery from system crashes,
concurrent access, quick application development,
data integrity and security.
 Levels of abstraction give data independence.
 A DBMS typically has a layered architecture.
 DBAs hold responsible jobs and are well-paid!
 DBMS R&D is one of the broadest & mature areas
in information system sector.


More Related Content

What's hot

Trends in Database Management
Trends in Database ManagementTrends in Database Management
Trends in Database Management
Marlon Jamera
 
SQL- Introduction to SQL database
SQL- Introduction to SQL database SQL- Introduction to SQL database
SQL- Introduction to SQL database
Vibrant Technologies & Computers
 
Multimedia Database
Multimedia Database Multimedia Database
Multimedia Database
Avnish Patel
 
CURRENT AND FUTURE TRENDS IN DBMS
CURRENT AND FUTURE TRENDS IN DBMSCURRENT AND FUTURE TRENDS IN DBMS
CURRENT AND FUTURE TRENDS IN DBMS
Gayathri P
 
ITFT- Dbms
ITFT- DbmsITFT- Dbms
ITFT- Dbms
Blossom Sood
 
Multimedia Database
Multimedia DatabaseMultimedia Database
Multimedia Database
District Administration
 
Emerging database technology multimedia database
Emerging database technology   multimedia databaseEmerging database technology   multimedia database
Emerging database technology multimedia database
Salama Al Busaidi
 
Multimedia db system
Multimedia db systemMultimedia db system
Multimedia db system
Yojana Nanaware
 

What's hot (8)

Trends in Database Management
Trends in Database ManagementTrends in Database Management
Trends in Database Management
 
SQL- Introduction to SQL database
SQL- Introduction to SQL database SQL- Introduction to SQL database
SQL- Introduction to SQL database
 
Multimedia Database
Multimedia Database Multimedia Database
Multimedia Database
 
CURRENT AND FUTURE TRENDS IN DBMS
CURRENT AND FUTURE TRENDS IN DBMSCURRENT AND FUTURE TRENDS IN DBMS
CURRENT AND FUTURE TRENDS IN DBMS
 
ITFT- Dbms
ITFT- DbmsITFT- Dbms
ITFT- Dbms
 
Multimedia Database
Multimedia DatabaseMultimedia Database
Multimedia Database
 
Emerging database technology multimedia database
Emerging database technology   multimedia databaseEmerging database technology   multimedia database
Emerging database technology multimedia database
 
Multimedia db system
Multimedia db systemMultimedia db system
Multimedia db system
 

Similar to Intro to dbms

Mydbms
MydbmsMydbms
Database Management Systems (DBMS)
Database Management Systems (DBMS)Database Management Systems (DBMS)
Database Management Systems (DBMS)Dimara Hakim
 
Ch1_Intro-95.ppt
Ch1_Intro-95.pptCh1_Intro-95.ppt
Ch1_Intro-95.ppt
Pulkit Mehndiratta
 
Ch1 intro
Ch1 introCh1 intro
Overview of databases
Overview of databasesOverview of databases
Overview of databases
shaik faroq
 
Introduction to Data Management
Introduction to Data ManagementIntroduction to Data Management
Introduction to Data Management
Cloudbells.com
 
Harsh
HarshHarsh
DBMS Full.ppt
DBMS Full.pptDBMS Full.ppt
DBMS Full.ppt
pritikanamaity600
 
Unit01 dbms 2
Unit01 dbms 2Unit01 dbms 2
Unit01 dbms 2
Venkat Reddy
 
Chapter 1( intro & overview)
Chapter 1( intro & overview)Chapter 1( intro & overview)
Chapter 1( intro & overview)
MUHAMMAD AAMIR
 
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
 
CC105-REVIEWER-WEEK2-4.docx
CC105-REVIEWER-WEEK2-4.docxCC105-REVIEWER-WEEK2-4.docx
CC105-REVIEWER-WEEK2-4.docx
ozaixyzo
 
Dbms1
Dbms1Dbms1
Emerging Technologies in IT
Emerging Technologies in ITEmerging Technologies in IT
DATABASE MANAGEMENT SYSTEM UNIT-I Chapter-1
DATABASE MANAGEMENT SYSTEM UNIT-I Chapter-1DATABASE MANAGEMENT SYSTEM UNIT-I Chapter-1
DATABASE MANAGEMENT SYSTEM UNIT-I Chapter-1
Raj vardhan
 
Ch 2-introduction to dbms
Ch 2-introduction to dbmsCh 2-introduction to dbms
Ch 2-introduction to dbms
Rupali Rana
 
Distributed Systems in Data Engineering
Distributed Systems in Data EngineeringDistributed Systems in Data Engineering
Distributed Systems in Data Engineering
Adetimehin Oluwasegun Matthew
 

Similar to Intro to dbms (20)

Mydbms
MydbmsMydbms
Mydbms
 
Database Management Systems (DBMS)
Database Management Systems (DBMS)Database Management Systems (DBMS)
Database Management Systems (DBMS)
 
Ch1_Intro-95.ppt
Ch1_Intro-95.pptCh1_Intro-95.ppt
Ch1_Intro-95.ppt
 
Ch1 intro
Ch1 introCh1 intro
Ch1 intro
 
Overview of databases
Overview of databasesOverview of databases
Overview of databases
 
Introduction to Data Management
Introduction to Data ManagementIntroduction to Data Management
Introduction to Data Management
 
Harsh
HarshHarsh
Harsh
 
Unit 01 dbms
Unit 01 dbmsUnit 01 dbms
Unit 01 dbms
 
DBMS Full.ppt
DBMS Full.pptDBMS Full.ppt
DBMS Full.ppt
 
Unit01 dbms 2
Unit01 dbms 2Unit01 dbms 2
Unit01 dbms 2
 
Chapter 1( intro & overview)
Chapter 1( intro & overview)Chapter 1( intro & overview)
Chapter 1( intro & overview)
 
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
 
CC105-REVIEWER-WEEK2-4.docx
CC105-REVIEWER-WEEK2-4.docxCC105-REVIEWER-WEEK2-4.docx
CC105-REVIEWER-WEEK2-4.docx
 
Dbms1
Dbms1Dbms1
Dbms1
 
Emerging Technologies in IT
Emerging Technologies in ITEmerging Technologies in IT
Emerging Technologies in IT
 
DATABASE MANAGEMENT SYSTEM UNIT-I Chapter-1
DATABASE MANAGEMENT SYSTEM UNIT-I Chapter-1DATABASE MANAGEMENT SYSTEM UNIT-I Chapter-1
DATABASE MANAGEMENT SYSTEM UNIT-I Chapter-1
 
Ch 2-introduction to dbms
Ch 2-introduction to dbmsCh 2-introduction to dbms
Ch 2-introduction to dbms
 
Dbms 1
Dbms 1Dbms 1
Dbms 1
 
Distributed Systems in Data Engineering
Distributed Systems in Data EngineeringDistributed Systems in Data Engineering
Distributed Systems in Data Engineering
 

More from Islamic University, Kushtia, Bangladesh

Integrated Water Resource Management
Integrated Water Resource ManagementIntegrated Water Resource Management
Integrated Water Resource Management
Islamic University, Kushtia, Bangladesh
 
Universe and the bigbang
Universe and the bigbangUniverse and the bigbang
Universe and the bigbang
Islamic University, Kushtia, Bangladesh
 
Origin of the solar system hypotheses
Origin of the solar system hypothesesOrigin of the solar system hypotheses
Origin of the solar system hypotheses
Islamic University, Kushtia, Bangladesh
 
Origin of the earth
Origin of the earthOrigin of the earth
Points and Circle of Reference
Points and Circle of ReferencePoints and Circle of Reference
Points and Circle of Reference
Islamic University, Kushtia, Bangladesh
 
Contour visualisation
Contour visualisationContour visualisation
History of cartography
History of cartographyHistory of cartography
Satellite Navigation
Satellite Navigation Satellite Navigation
Introduction to Satellite Communication System
Introduction to Satellite Communication SystemIntroduction to Satellite Communication System
Introduction to Satellite Communication System
Islamic University, Kushtia, Bangladesh
 
Components of a satellite communication system transponder
Components of a satellite communication system transponderComponents of a satellite communication system transponder
Components of a satellite communication system transponder
Islamic University, Kushtia, Bangladesh
 
Locational importance of bangladesh
Locational importance of bangladeshLocational importance of bangladesh
Locational importance of bangladesh
Islamic University, Kushtia, Bangladesh
 
Capability classification of Land
Capability classification of LandCapability classification of Land
Capability classification of Land
Islamic University, Kushtia, Bangladesh
 
Introduction to geomatics
Introduction to geomaticsIntroduction to geomatics
Introduction to geomatics
Islamic University, Kushtia, Bangladesh
 
Evolution of the earth
Evolution of the earth Evolution of the earth
Definitions of geography
Definitions of geographyDefinitions of geography
Definitions of geography
Islamic University, Kushtia, Bangladesh
 

More from Islamic University, Kushtia, Bangladesh (20)

Land-use Zoning.pptx
Land-use Zoning.pptxLand-use Zoning.pptx
Land-use Zoning.pptx
 
Integrated Water Resource Management
Integrated Water Resource ManagementIntegrated Water Resource Management
Integrated Water Resource Management
 
Universe and the bigbang
Universe and the bigbangUniverse and the bigbang
Universe and the bigbang
 
Origin of the solar system hypotheses
Origin of the solar system hypothesesOrigin of the solar system hypotheses
Origin of the solar system hypotheses
 
Origin of the earth
Origin of the earthOrigin of the earth
Origin of the earth
 
Points and Circle of Reference
Points and Circle of ReferencePoints and Circle of Reference
Points and Circle of Reference
 
Contour visualisation
Contour visualisationContour visualisation
Contour visualisation
 
History of cartography
History of cartographyHistory of cartography
History of cartography
 
Satellite Navigation
Satellite Navigation Satellite Navigation
Satellite Navigation
 
Antenna system
Antenna systemAntenna system
Antenna system
 
Introduction to Satellite Communication System
Introduction to Satellite Communication SystemIntroduction to Satellite Communication System
Introduction to Satellite Communication System
 
Components of a satellite communication system transponder
Components of a satellite communication system transponderComponents of a satellite communication system transponder
Components of a satellite communication system transponder
 
Satellite orbits
Satellite orbitsSatellite orbits
Satellite orbits
 
Locational importance of bangladesh
Locational importance of bangladeshLocational importance of bangladesh
Locational importance of bangladesh
 
Introduction to Landuse planning
Introduction to Landuse planningIntroduction to Landuse planning
Introduction to Landuse planning
 
Capability classification of Land
Capability classification of LandCapability classification of Land
Capability classification of Land
 
Introduction to geomatics
Introduction to geomaticsIntroduction to geomatics
Introduction to geomatics
 
Galaxy
Galaxy Galaxy
Galaxy
 
Evolution of the earth
Evolution of the earth Evolution of the earth
Evolution of the earth
 
Definitions of geography
Definitions of geographyDefinitions of geography
Definitions of geography
 

Recently uploaded

Jpolillo Amazon PPC - Bid Optimization Sample
Jpolillo Amazon PPC - Bid Optimization SampleJpolillo Amazon PPC - Bid Optimization Sample
Jpolillo Amazon PPC - Bid Optimization Sample
James Polillo
 
Q1’2024 Update: MYCI’s Leap Year Rebound
Q1’2024 Update: MYCI’s Leap Year ReboundQ1’2024 Update: MYCI’s Leap Year Rebound
Q1’2024 Update: MYCI’s Leap Year Rebound
Oppotus
 
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Subhajit Sahu
 
一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单
enxupq
 
Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)
TravisMalana
 
Tabula.io Cheatsheet: automate your data workflows
Tabula.io Cheatsheet: automate your data workflowsTabula.io Cheatsheet: automate your data workflows
Tabula.io Cheatsheet: automate your data workflows
alex933524
 
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
ewymefz
 
Opendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptxOpendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptx
Opendatabay
 
一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单
ewymefz
 
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
ukgaet
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
ewymefz
 
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
nscud
 
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
axoqas
 
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
ewymefz
 
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
John Andrews
 
社内勉強会資料_LLM Agents                              .
社内勉強会資料_LLM Agents                              .社内勉強会資料_LLM Agents                              .
社内勉強会資料_LLM Agents                              .
NABLAS株式会社
 
tapal brand analysis PPT slide for comptetive data
tapal brand analysis PPT slide for comptetive datatapal brand analysis PPT slide for comptetive data
tapal brand analysis PPT slide for comptetive data
theahmadsaood
 
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdfSample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
Linda486226
 
Innovative Methods in Media and Communication Research by Sebastian Kubitschk...
Innovative Methods in Media and Communication Research by Sebastian Kubitschk...Innovative Methods in Media and Communication Research by Sebastian Kubitschk...
Innovative Methods in Media and Communication Research by Sebastian Kubitschk...
correoyaya
 
standardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghhstandardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghh
ArpitMalhotra16
 

Recently uploaded (20)

Jpolillo Amazon PPC - Bid Optimization Sample
Jpolillo Amazon PPC - Bid Optimization SampleJpolillo Amazon PPC - Bid Optimization Sample
Jpolillo Amazon PPC - Bid Optimization Sample
 
Q1’2024 Update: MYCI’s Leap Year Rebound
Q1’2024 Update: MYCI’s Leap Year ReboundQ1’2024 Update: MYCI’s Leap Year Rebound
Q1’2024 Update: MYCI’s Leap Year Rebound
 
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
 
一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单
 
Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)
 
Tabula.io Cheatsheet: automate your data workflows
Tabula.io Cheatsheet: automate your data workflowsTabula.io Cheatsheet: automate your data workflows
Tabula.io Cheatsheet: automate your data workflows
 
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
 
Opendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptxOpendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptx
 
一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单
 
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
 
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
 
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
 
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
 
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
 
社内勉強会資料_LLM Agents                              .
社内勉強会資料_LLM Agents                              .社内勉強会資料_LLM Agents                              .
社内勉強会資料_LLM Agents                              .
 
tapal brand analysis PPT slide for comptetive data
tapal brand analysis PPT slide for comptetive datatapal brand analysis PPT slide for comptetive data
tapal brand analysis PPT slide for comptetive data
 
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdfSample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
 
Innovative Methods in Media and Communication Research by Sebastian Kubitschk...
Innovative Methods in Media and Communication Research by Sebastian Kubitschk...Innovative Methods in Media and Communication Research by Sebastian Kubitschk...
Innovative Methods in Media and Communication Research by Sebastian Kubitschk...
 
standardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghhstandardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghh
 

Intro to dbms

  • 1. 1 Database Systems I F F A T A R A Dept. of Geomatics Geographic Information System GOM-311
  • 2. 2 What is DBMS?  Need for information management  A very large, integrated collection of data.  Models real-world enterprise. – Entities (e.g., students, courses) – Relationships (e.g., John is taking CS662)  A Database Management System (DBMS) is a software package designed to store and manage databases.
  • 3. 3 Why Use a DBMS?  Data independence and efficient access.  Data integrity and security.  Uniform data administration.  Concurrent access, recovery from crashes.  Replication control  Reduced application development time.
  • 4. 4 Why Study Databases??  Shift from computation to information – at the “low end”: access to physical world – at the “high end”: scientific applications  Datasets increasing in diversity and volume. – Digital libraries, interactive video, Human Genome project, e-commerce, sensor networks – ... need for DBMS/data services exploding  DBMS encompasses several areas of CS – OS, languages, theory, AI, multimedia, logic
  • 5. 5 Data Models  A data model is a collection of concepts for describing data.  A schema is a description of a particular collection of data, using the a given data model.  The relational model of data is the most widely used model today. – Main concept: relation, basically a table with rows and columns. – Every relation has a schema, which describes the columns, or fields.
  • 6. 6 Levels of Abstraction  Many views, single conceptual (logical) schema and physical schema. – Views describe how users see the data. – Conceptual schema defines logical structure – Physical schema describes the files and indexes used. * Schemas are defined using DDL; data is modified/queried using DML.
  • 8. 8 Example: University Database  Conceptual schema: – Students(sid: string, name: string, login: string, age: integer, gpa:real) – Courses(cid: string, cname:string, credits:integer) – Enrolled(sid:string, cid:string, grade:string)  Physical schema: – Relations stored as unordered files. – Index on first column of Students.  External Schema (View): – Course_info(cid:string, enrollment:integer)
  • 9. 9 Data Independence  Applications insulated from how data is structured and stored.  Logical data independence: Protection from changes in logical structure of data.  Physical data independence: Protection from changes in physical structure of data. * One of the most important benefits of using a DBMS!
  • 10. 10 Concurrency Control  Concurrent execution of user programs is essential for good DBMS performance. – Because disk accesses are frequent, and relatively slow, it is important to keep the CPU humming by working on several user programs concurrently.  Interleaving actions of different user programs can lead to inconsistency: e.g., check is cleared while account balance is being computed.  DBMS ensures such problems don’t arise: users can pretend they are using a single-user system.
  • 11. 11 Transaction: An Execution Unit of a DB  Key concept is transaction, which is an atomic sequence of database actions (reads/writes).  Each transaction, executed completely, must leave the DB in a consistent state if DB is consistent when the transaction begins. – Users can specify some simple integrity constraints on the data, and the DBMS will enforce these constraints. – Beyond this, the DBMS does not really understand the semantics of the data. (e.g., it does not understand how the interest on a bank account is computed). Why not? – Thus, ensuring that a transaction (run alone) preserves consistency is ultimately the user’s responsibility!
  • 12. 12 Scheduling Concurrent Transactions  DBMS ensures that execution of {T1, ... , Tn} is equivalent to some serial execution T1’ ... Tn’. – Before reading/writing an object, a transaction requests a lock on the object, and waits till the DBMS gives it the lock. All locks are released at the end of the transaction. (Strict 2PL locking protocol.) – Idea: If an action of Ti (say, writing X) affects Tj (which perhaps reads X), one of them, say Ti, will obtain the lock on X first and Tj is forced to wait until Ti completes; this effectively orders the transactions. – What if Tj already has a lock on Y and Ti later requests a lock on Y? What is it called? What will happen?
  • 13. 13 Ensuring Atomicity  DBMS ensures atomicity (all-or-nothing property) even if system crashes in the middle of a Xact.  Idea: Keep a log (history) of all actions carried out by the DBMS while executing a set of Xacts: – Before a change is made to the database, the corresponding log entry is forced to a safe location. (WAL protocol.) – After a crash, the effects of partially executed transactions are undone using the log. (Thanks to WAL, if log entry wasn’t saved before the crash, corresponding change was not applied to database!)
  • 14. 14 The Log  The following actions are recorded in the log: – Ti writes an object: the old value and the new value. u Log record must go to disk before the changed page! – Ti commits/aborts: a log record indicating this action.  Log records chained together by Xact id, so it’s easy to undo a specific Xact (e.g., to resolve a deadlock).  Log is often duplexed and archived on “stable” storage.  All log related activities (and in fact, all CC related activities such as lock/unlock, dealing with deadlocks etc.) are handled transparently by the DBMS.
  • 15. 15 Databases make these folks happy ...  End users and DBMS vendors  DB application programmers – e.g. webmasters  Database administrator (DBA) – Designs logical /physical schemas – Handles security and authorization – Data availability, crash recovery – Database tuning as needs evolve Must understand how a DBMS works!
  • 16. 16 Structure of a DBMS  A typical DBMS has a layered architecture.  The figure does not show the concurrency control and recovery components.  This is one of several possible architectures; each system has its own variations. Query Optimization and Execution Relational Operators Files and Access Methods Buffer Management Disk Space Management DB These layers must consider concurrency control and recovery
  • 17. 17 Summary  DBMS used to maintain, query large datasets.  Benefits include recovery from system crashes, concurrent access, quick application development, data integrity and security.  Levels of abstraction give data independence.  A DBMS typically has a layered architecture.  DBAs hold responsible jobs and are well-paid!  DBMS R&D is one of the broadest & mature areas in information system sector. 