SlideShare ist ein Scribd-Unternehmen logo
1 von 37
Downloaden Sie, um offline zu lesen
Database Systems
Khwaja Fareed University of Engineering & IT
Lecture 1Lecture 1
Fundamental Database ConceptsFundamental Database Concepts
A database is any collection of data.
A DBMS is a software system
designed to maintain a database.
We use a DBMS when
 there is a large amount of data
 security and integrity of the data are important
 many users access the data concurrently
Consider a Phone Company, such as AT&T
Kinds of information they deal with:
customer records
billing information
employee records
management records
customer service orders
switching and wiring diagrams
With all that data,
AT&T must be concerned with questions such as:
 Where is the information kept?
 How is the data structured?
 How is the data kept consistent?
 How is the data described?
 How is the data kept secure?
 How do different pieces of data interrelate?
Without a DBMS, we'd have:
data stored as bits on disks
organized as files
Access by a collection
of ad hoc programs
in C++, Java, PHP, etc.
users of
the data
There is no control or
coordination of what
these programs do
with the data
With a DBMS, we have:
data stored as bits on disks
organized as files
users of
the data
DBMS provides control
and coordination to
protect the data.
DBMS
applications
data
users of
the data
data
dictionary
data
definition
processor
query processor
security manager
concurrency manager
index manager
application
program(s)
application
program(s)
application
program(s)
application
program(s)
internal/implementation view
external/application view
DBMS
software
components
data
description
users of
the data
application
program(s)
application
program(s)
application
program(s)
application
program(s)
data
data
dictionary
data
definition
processor
query processor
security manager
concurrency manager
index manager
DDL:
data
definition
language
system
configuration
languages
QL: query language
DML: data manipulation language
GPL: general purpose languages
Anything you can do with a DBMS,
you can do with a file system, a network
and a heap of C code
So why spend the money to buy a DBMS?
 there is a well defined collection of capabilities common to a
certain class of applications
 for applications in this class, the DBMS already has these
capabilities and probably does them better than you could with
home-brewed code
users of
the data
application
program(s)
application
program(s)
application
program(s)
application
program(s)
data
data
dictionary
data
definition
processor
query processor
security manager
concurrency manager
index manager
software operating
between the data and
the applications can
provide many
capabilities
in a generic way
A DBMS provides
persistent objects, types and data structures
 persistent = having a lifetime longer than
the programs that use the data
 any information that fits the data model
of a particular DBMS
can be made persistent with little effort
 data model = concepts that can be used to describe the data
A DBMS supports access by concurrent users
 concurrent = happening at the same time
 concurrent access, particularly writes (data changes),
can result in inconsistent states
(even when the individual operations are correct)
 the DBMS can check the actual operations of concurrent users,
to prevent activity that will lead to inconsistent states
A DBMS can restrict access to authorized users
 security policies often require control that is more fine-grained
than that provided by a file system
 since the DBMS understands the data structure, it can enforce
fairly sophisticated and detailed security policies
 on subsets of the data
 on subsets of the available operations
A DBMS can assist in controlling redundancy
 redundancy = multiple copies of the same data
 with file storage, it's often convenient to store multiple copies
of the same data, so that it's "local" to other data and
applications
 this can cause many problems:
 wasted disk space
 inconsistencies
 need to enter the data multiple times
A DBMS supports representation
of complex relationships and integrity constraints
 the semantics (meaning) of an application often
includes many relationships and rules
about the relative values of subsets of the data
 these further restrict the possible instances of the database
 relationships and constraints can be defined as part of the
schema
A DBMS can provide backup and recovery
 backup = snapshots of the data particular times
 recovery = restoring the data to a consistent state
after a system crash
 the higher level semantics (relationships and constraints)
can make it difficult to restore a consistent state
 transaction analysis can allow a DBMS to reconstruct a
consistent state from a number of backups
A DBMS can support
multiple user interfaces and user views
 since the DBMS provides a well-defined data model and a
persistent data dictionary, many different interfaces can be
developed to access the same data
 data independence ensures that these UIs will not be made
invalid by most changes to the data
 new user views can be supported as new schemas defined
against the conceptual schema
persistent objects, types and data structures
control of concurrent users
controlling of redundancy
restricting access (security)
representation of complex relationships
and integrity constraints
backup and recovery
multiple user interfaces and user views
users of
the data
application
program(s)
application
program(s)
application
program(s)
application
program(s)
data
data
dictionary
data
definition
processor
query processor
security manager
concurrency manager
index manager
database
designer
application developers
system
administrator
(and DB
designer)
DBMS
system
developers
Actors On the Scene
(people interested in the actual data):
 database administrators
 database designers
 systems analysts and application programmers
 end users
Database Administrators
 acquiring a DBMS
 managing the system
 acquiring HW and SW to support the DBMS
 authorizing access (security policies)
 managing staff, including DB designers
Database Designers
 identifying the information of interested
in the Universe of Discourse (UoD)
 designing the database conceptual schema
 designing views for particular users
 designing the physical data layout and logical schema
 adjusting data parameters for performance
Systems Analysts and Application Programmers
(generic database developers)
 provide specialized knowledge to optimize database usage
 provide generic (canned) application programs
End Users
 casual users: ad-hoc queries
 naïve or parametric users: canned queries such as menus for a
phone company customer service agent
 sophisticated users: people who understand the system and the
data and use it in many novel ways
 standalone users: people who use personal easy-to-use
databases for personal data
Actors Behind the Scene:
people who maintain the environment
but aren't interested in the actual data
 DBMS designers and implementers
 tools developers
 operators and maintenance personnel
 database researchers
DBMS designers and implementers
 work for the company that supplies the DBMS
(i.e. Microsoft , Oracle, Sybase, MySQL …)
 programmers and engineers
 design and implement the DBMS
Tools Developers
 design and implement DBMS add-ons or plug-ins
 may work for DBMS supplier or be independent
 kinds of tools: database design aids, performance monitoring
tools, user and designer interfaces
Operators and maintenance personnel
 run and maintain the computer environment in which a DBMS
operates
 probably work for the database administrator (DBA)
Database Researchers
 academic or industrial researchers
 develop new theory, new designs, new data models and new
algorithms to improve future database management systems
A database instance is the collective values of
all database objects at some point in time
 also called the (data) instance or (database) state
A schema describes the database and
defines the possible instances
 also called the data definition, data dictionary, or meta-data
A data model describes the possible schemas
(essentially the meta-schema)
A DBMS is designed around a particular data
model
 this is what allows all system components (and humans)
to understand the schema and data
possible data models
 relational,
object-oriented, object-relational,
entity-relationship,
semantic, network, hierarchical, etc.
A physical data model describes the way
in which data is stored in the computer
 typically only of interest to database designers, implementers
and maintainers …not end users
 must provide a well-defined structure that can be mapped to
the conceptual schema
 allows optimization strategies to be defined generically
External View External View External View
Internal Schema
Conceptual Schema generic view
physical view
user-specific
views
physical data independence
 conceptual and external schema are defined
in terms of the data model,
rather than the actual data layout
 ensures that conceptual and external schemas
are not affected by changes to the physical data layout
logical data independence
 ensures that changes to the conceptual schema
don't affect the external views
 (this is not always achievable)

Weitere ähnliche Inhalte

Was ist angesagt?

Week 2 Characteristics & Benefits of a Database & Types of Data Models
Week 2 Characteristics & Benefits of a Database & Types of Data ModelsWeek 2 Characteristics & Benefits of a Database & Types of Data Models
Week 2 Characteristics & Benefits of a Database & Types of Data Modelsoudesign
 
Structure of dbms
Structure of dbmsStructure of dbms
Structure of dbmsMegha yadav
 
Data base management system
Data base management systemData base management system
Data base management systemNavneet Jingar
 
L7 data model and dbms architecture
L7  data model and dbms architectureL7  data model and dbms architecture
L7 data model and dbms architectureRushdi Shams
 
Introduction of DBMS
Introduction of DBMSIntroduction of DBMS
Introduction of DBMSYouQue ™
 
Advantages and disadvantages of DBMS
Advantages and disadvantages of DBMSAdvantages and disadvantages of DBMS
Advantages and disadvantages of DBMSMohit Singhal
 
DBMS FOR STUDENTS MUST DOWNLOAD AND READ
DBMS FOR STUDENTS MUST DOWNLOAD AND READDBMS FOR STUDENTS MUST DOWNLOAD AND READ
DBMS FOR STUDENTS MUST DOWNLOAD AND READamitp26
 
File systems versus a dbms
File systems versus a dbmsFile systems versus a dbms
File systems versus a dbmsRituBhargava7
 
Database management system
Database management systemDatabase management system
Database management systemashishkthakur94
 
Database introduction
Database introductionDatabase introduction
Database introductionHarry Potter
 
Database management systems
Database management systemsDatabase management systems
Database management systemsJoel Briza
 
Database Management System
Database Management SystemDatabase Management System
Database Management SystemTamur Iqbal
 

Was ist angesagt? (20)

Database Lecture Notes
Database Lecture NotesDatabase Lecture Notes
Database Lecture Notes
 
Database & dbms
Database & dbmsDatabase & dbms
Database & dbms
 
Unit iii dbms
Unit iii dbmsUnit iii dbms
Unit iii dbms
 
Week 2 Characteristics & Benefits of a Database & Types of Data Models
Week 2 Characteristics & Benefits of a Database & Types of Data ModelsWeek 2 Characteristics & Benefits of a Database & Types of Data Models
Week 2 Characteristics & Benefits of a Database & Types of Data Models
 
Structure of dbms
Structure of dbmsStructure of dbms
Structure of dbms
 
Data base management system
Data base management systemData base management system
Data base management system
 
L7 data model and dbms architecture
L7  data model and dbms architectureL7  data model and dbms architecture
L7 data model and dbms architecture
 
Database management system
Database management systemDatabase management system
Database management system
 
Introduction of DBMS
Introduction of DBMSIntroduction of DBMS
Introduction of DBMS
 
Advantages and disadvantages of DBMS
Advantages and disadvantages of DBMSAdvantages and disadvantages of DBMS
Advantages and disadvantages of DBMS
 
DBMS FOR STUDENTS MUST DOWNLOAD AND READ
DBMS FOR STUDENTS MUST DOWNLOAD AND READDBMS FOR STUDENTS MUST DOWNLOAD AND READ
DBMS FOR STUDENTS MUST DOWNLOAD AND READ
 
File systems versus a dbms
File systems versus a dbmsFile systems versus a dbms
File systems versus a dbms
 
Database management system
Database management systemDatabase management system
Database management system
 
Database introduction
Database introductionDatabase introduction
Database introduction
 
data base manage ment
data base manage mentdata base manage ment
data base manage ment
 
Chapter2
Chapter2Chapter2
Chapter2
 
Database management systems
Database management systemsDatabase management systems
Database management systems
 
DBMS
DBMSDBMS
DBMS
 
Database Management System
Database Management SystemDatabase Management System
Database Management System
 
Dbms
DbmsDbms
Dbms
 

Ähnlich wie Lecture1

Introduction to Database
Introduction to DatabaseIntroduction to Database
Introduction to DatabaseSiti Ismail
 
database introductoin optimization1-app6891.pdf
database introductoin optimization1-app6891.pdfdatabase introductoin optimization1-app6891.pdf
database introductoin optimization1-app6891.pdfparveen204931475
 
Database Design Slide 1
Database Design Slide 1Database Design Slide 1
Database Design Slide 1ahfiki
 
Database Management System Introduction
Database Management System IntroductionDatabase Management System Introduction
Database Management System IntroductionSmriti Jain
 
Ch-1-Introduction-to-Database.pdf
Ch-1-Introduction-to-Database.pdfCh-1-Introduction-to-Database.pdf
Ch-1-Introduction-to-Database.pdfMrjJoker1
 
DBMS introduction and functionality of of dbms
DBMS introduction and functionality of  of dbmsDBMS introduction and functionality of  of dbms
DBMS introduction and functionality of of dbmsranjana dalwani
 
DBMS-INTRODUCTION.pptx
DBMS-INTRODUCTION.pptxDBMS-INTRODUCTION.pptx
DBMS-INTRODUCTION.pptxDivyaKS12
 
Database Management system
Database Management systemDatabase Management system
Database Management systemVijay Thorat
 
Database management system
Database management systemDatabase management system
Database management systemsonykhan3
 

Ähnlich wie Lecture1 (20)

Dbms models
Dbms modelsDbms models
Dbms models
 
DBMS and its Models
DBMS and its ModelsDBMS and its Models
DBMS and its Models
 
Introduction to Database
Introduction to DatabaseIntroduction to Database
Introduction to Database
 
database introductoin optimization1-app6891.pdf
database introductoin optimization1-app6891.pdfdatabase introductoin optimization1-app6891.pdf
database introductoin optimization1-app6891.pdf
 
Database management systems
Database management systemsDatabase management systems
Database management systems
 
Database Design Slide 1
Database Design Slide 1Database Design Slide 1
Database Design Slide 1
 
Database Management System Introduction
Database Management System IntroductionDatabase Management System Introduction
Database Management System Introduction
 
DataMgt - UNIT-I .PPT
DataMgt - UNIT-I .PPTDataMgt - UNIT-I .PPT
DataMgt - UNIT-I .PPT
 
Dbms
DbmsDbms
Dbms
 
27 fcs157al2
27 fcs157al227 fcs157al2
27 fcs157al2
 
Unit01 dbms
Unit01 dbmsUnit01 dbms
Unit01 dbms
 
Ch-1-Introduction-to-Database.pdf
Ch-1-Introduction-to-Database.pdfCh-1-Introduction-to-Database.pdf
Ch-1-Introduction-to-Database.pdf
 
En ch01
En ch01En ch01
En ch01
 
DBMS introduction and functionality of of dbms
DBMS introduction and functionality of  of dbmsDBMS introduction and functionality of  of dbms
DBMS introduction and functionality of of dbms
 
DBMS-INTRODUCTION.pptx
DBMS-INTRODUCTION.pptxDBMS-INTRODUCTION.pptx
DBMS-INTRODUCTION.pptx
 
Database Management system
Database Management systemDatabase Management system
Database Management system
 
DBMS Full.ppt
DBMS Full.pptDBMS Full.ppt
DBMS Full.ppt
 
Introduction DBMS.pptx
Introduction DBMS.pptxIntroduction DBMS.pptx
Introduction DBMS.pptx
 
Dbms user
Dbms userDbms user
Dbms user
 
Database management system
Database management systemDatabase management system
Database management system
 

Kürzlich hochgeladen

Banking: Commercial and Central Banking.pptx
Banking: Commercial and Central Banking.pptxBanking: Commercial and Central Banking.pptx
Banking: Commercial and Central Banking.pptxANTHONYAKINYOSOYE1
 
Money Forward Integrated Report “Forward Map” 2024
Money Forward Integrated Report “Forward Map” 2024Money Forward Integrated Report “Forward Map” 2024
Money Forward Integrated Report “Forward Map” 2024Money Forward
 
Global Economic Outlook, 2024 - Scholaride Consulting
Global Economic Outlook, 2024 - Scholaride ConsultingGlobal Economic Outlook, 2024 - Scholaride Consulting
Global Economic Outlook, 2024 - Scholaride Consultingswastiknandyofficial
 
What is sip and What are its Benefits in 2024
What is sip and What are its Benefits in 2024What is sip and What are its Benefits in 2024
What is sip and What are its Benefits in 2024prajwalgopocket
 
ekthesi-trapeza-tis-ellados-gia-2023.pdf
ekthesi-trapeza-tis-ellados-gia-2023.pdfekthesi-trapeza-tis-ellados-gia-2023.pdf
ekthesi-trapeza-tis-ellados-gia-2023.pdfSteliosTheodorou4
 
2B Nation-State.pptx contemporary world nation
2B  Nation-State.pptx contemporary world nation2B  Nation-State.pptx contemporary world nation
2B Nation-State.pptx contemporary world nationko9240888
 
Aon-UK-DC-Pension-Tracker-Q1-2024. slideshare
Aon-UK-DC-Pension-Tracker-Q1-2024. slideshareAon-UK-DC-Pension-Tracker-Q1-2024. slideshare
Aon-UK-DC-Pension-Tracker-Q1-2024. slideshareHenry Tapper
 
Building pressure? Rising rents, and what to expect in the future
Building pressure? Rising rents, and what to expect in the futureBuilding pressure? Rising rents, and what to expect in the future
Building pressure? Rising rents, and what to expect in the futureResolutionFoundation
 
Thoma Bravo Equity - Presentation Pension Fund
Thoma Bravo Equity - Presentation Pension FundThoma Bravo Equity - Presentation Pension Fund
Thoma Bravo Equity - Presentation Pension FundAshwinJey
 
Gender and caste discrimination in india
Gender and caste discrimination in indiaGender and caste discrimination in india
Gender and caste discrimination in indiavandanasingh01072003
 
Introduction to Health Economics Dr. R. Kurinji Malar.pptx
Introduction to Health Economics Dr. R. Kurinji Malar.pptxIntroduction to Health Economics Dr. R. Kurinji Malar.pptx
Introduction to Health Economics Dr. R. Kurinji Malar.pptxDrRkurinjiMalarkurin
 
OAT_RI_Ep18 WeighingTheRisks_Mar24_GlobalCredit.pptx
OAT_RI_Ep18 WeighingTheRisks_Mar24_GlobalCredit.pptxOAT_RI_Ep18 WeighingTheRisks_Mar24_GlobalCredit.pptx
OAT_RI_Ep18 WeighingTheRisks_Mar24_GlobalCredit.pptxhiddenlevers
 
Crypto Confidence Unlocked: AnyKYCaccount's Shortcut to Binance Verification
Crypto Confidence Unlocked: AnyKYCaccount's Shortcut to Binance VerificationCrypto Confidence Unlocked: AnyKYCaccount's Shortcut to Binance Verification
Crypto Confidence Unlocked: AnyKYCaccount's Shortcut to Binance VerificationAny kyc Account
 
Liquidity Decisions in Financial management
Liquidity Decisions in Financial managementLiquidity Decisions in Financial management
Liquidity Decisions in Financial managementshrutisingh143670
 
ΤτΕ: Ανάπτυξη 2,3% και πληθωρισμός 2,8% φέτος
ΤτΕ: Ανάπτυξη 2,3% και πληθωρισμός 2,8% φέτοςΤτΕ: Ανάπτυξη 2,3% και πληθωρισμός 2,8% φέτος
ΤτΕ: Ανάπτυξη 2,3% και πληθωρισμός 2,8% φέτοςNewsroom8
 
Hello this ppt is about seminar final project
Hello this ppt is about seminar final projectHello this ppt is about seminar final project
Hello this ppt is about seminar final projectninnasirsi
 
2024-04-09 - Pension Playpen roundtable - slides.pptx
2024-04-09 - Pension Playpen roundtable - slides.pptx2024-04-09 - Pension Playpen roundtable - slides.pptx
2024-04-09 - Pension Playpen roundtable - slides.pptxHenry Tapper
 
10 QuickBooks Tips 2024 - Globus Finanza.pdf
10 QuickBooks Tips 2024 - Globus Finanza.pdf10 QuickBooks Tips 2024 - Globus Finanza.pdf
10 QuickBooks Tips 2024 - Globus Finanza.pdfglobusfinanza
 
The Inspirational Story of Julio Herrera Velutini - Global Finance Leader
The Inspirational Story of Julio Herrera Velutini - Global Finance LeaderThe Inspirational Story of Julio Herrera Velutini - Global Finance Leader
The Inspirational Story of Julio Herrera Velutini - Global Finance LeaderArianna Varetto
 
Kempen ' UK DB Endgame Paper Apr 24 final3.pdf
Kempen ' UK DB Endgame Paper Apr 24 final3.pdfKempen ' UK DB Endgame Paper Apr 24 final3.pdf
Kempen ' UK DB Endgame Paper Apr 24 final3.pdfHenry Tapper
 

Kürzlich hochgeladen (20)

Banking: Commercial and Central Banking.pptx
Banking: Commercial and Central Banking.pptxBanking: Commercial and Central Banking.pptx
Banking: Commercial and Central Banking.pptx
 
Money Forward Integrated Report “Forward Map” 2024
Money Forward Integrated Report “Forward Map” 2024Money Forward Integrated Report “Forward Map” 2024
Money Forward Integrated Report “Forward Map” 2024
 
Global Economic Outlook, 2024 - Scholaride Consulting
Global Economic Outlook, 2024 - Scholaride ConsultingGlobal Economic Outlook, 2024 - Scholaride Consulting
Global Economic Outlook, 2024 - Scholaride Consulting
 
What is sip and What are its Benefits in 2024
What is sip and What are its Benefits in 2024What is sip and What are its Benefits in 2024
What is sip and What are its Benefits in 2024
 
ekthesi-trapeza-tis-ellados-gia-2023.pdf
ekthesi-trapeza-tis-ellados-gia-2023.pdfekthesi-trapeza-tis-ellados-gia-2023.pdf
ekthesi-trapeza-tis-ellados-gia-2023.pdf
 
2B Nation-State.pptx contemporary world nation
2B  Nation-State.pptx contemporary world nation2B  Nation-State.pptx contemporary world nation
2B Nation-State.pptx contemporary world nation
 
Aon-UK-DC-Pension-Tracker-Q1-2024. slideshare
Aon-UK-DC-Pension-Tracker-Q1-2024. slideshareAon-UK-DC-Pension-Tracker-Q1-2024. slideshare
Aon-UK-DC-Pension-Tracker-Q1-2024. slideshare
 
Building pressure? Rising rents, and what to expect in the future
Building pressure? Rising rents, and what to expect in the futureBuilding pressure? Rising rents, and what to expect in the future
Building pressure? Rising rents, and what to expect in the future
 
Thoma Bravo Equity - Presentation Pension Fund
Thoma Bravo Equity - Presentation Pension FundThoma Bravo Equity - Presentation Pension Fund
Thoma Bravo Equity - Presentation Pension Fund
 
Gender and caste discrimination in india
Gender and caste discrimination in indiaGender and caste discrimination in india
Gender and caste discrimination in india
 
Introduction to Health Economics Dr. R. Kurinji Malar.pptx
Introduction to Health Economics Dr. R. Kurinji Malar.pptxIntroduction to Health Economics Dr. R. Kurinji Malar.pptx
Introduction to Health Economics Dr. R. Kurinji Malar.pptx
 
OAT_RI_Ep18 WeighingTheRisks_Mar24_GlobalCredit.pptx
OAT_RI_Ep18 WeighingTheRisks_Mar24_GlobalCredit.pptxOAT_RI_Ep18 WeighingTheRisks_Mar24_GlobalCredit.pptx
OAT_RI_Ep18 WeighingTheRisks_Mar24_GlobalCredit.pptx
 
Crypto Confidence Unlocked: AnyKYCaccount's Shortcut to Binance Verification
Crypto Confidence Unlocked: AnyKYCaccount's Shortcut to Binance VerificationCrypto Confidence Unlocked: AnyKYCaccount's Shortcut to Binance Verification
Crypto Confidence Unlocked: AnyKYCaccount's Shortcut to Binance Verification
 
Liquidity Decisions in Financial management
Liquidity Decisions in Financial managementLiquidity Decisions in Financial management
Liquidity Decisions in Financial management
 
ΤτΕ: Ανάπτυξη 2,3% και πληθωρισμός 2,8% φέτος
ΤτΕ: Ανάπτυξη 2,3% και πληθωρισμός 2,8% φέτοςΤτΕ: Ανάπτυξη 2,3% και πληθωρισμός 2,8% φέτος
ΤτΕ: Ανάπτυξη 2,3% και πληθωρισμός 2,8% φέτος
 
Hello this ppt is about seminar final project
Hello this ppt is about seminar final projectHello this ppt is about seminar final project
Hello this ppt is about seminar final project
 
2024-04-09 - Pension Playpen roundtable - slides.pptx
2024-04-09 - Pension Playpen roundtable - slides.pptx2024-04-09 - Pension Playpen roundtable - slides.pptx
2024-04-09 - Pension Playpen roundtable - slides.pptx
 
10 QuickBooks Tips 2024 - Globus Finanza.pdf
10 QuickBooks Tips 2024 - Globus Finanza.pdf10 QuickBooks Tips 2024 - Globus Finanza.pdf
10 QuickBooks Tips 2024 - Globus Finanza.pdf
 
The Inspirational Story of Julio Herrera Velutini - Global Finance Leader
The Inspirational Story of Julio Herrera Velutini - Global Finance LeaderThe Inspirational Story of Julio Herrera Velutini - Global Finance Leader
The Inspirational Story of Julio Herrera Velutini - Global Finance Leader
 
Kempen ' UK DB Endgame Paper Apr 24 final3.pdf
Kempen ' UK DB Endgame Paper Apr 24 final3.pdfKempen ' UK DB Endgame Paper Apr 24 final3.pdf
Kempen ' UK DB Endgame Paper Apr 24 final3.pdf
 

Lecture1

  • 1. Database Systems Khwaja Fareed University of Engineering & IT Lecture 1Lecture 1 Fundamental Database ConceptsFundamental Database Concepts
  • 2. A database is any collection of data. A DBMS is a software system designed to maintain a database. We use a DBMS when  there is a large amount of data  security and integrity of the data are important  many users access the data concurrently
  • 3. Consider a Phone Company, such as AT&T Kinds of information they deal with: customer records billing information employee records management records customer service orders switching and wiring diagrams
  • 4. With all that data, AT&T must be concerned with questions such as:  Where is the information kept?  How is the data structured?  How is the data kept consistent?  How is the data described?  How is the data kept secure?  How do different pieces of data interrelate?
  • 5. Without a DBMS, we'd have: data stored as bits on disks organized as files Access by a collection of ad hoc programs in C++, Java, PHP, etc. users of the data There is no control or coordination of what these programs do with the data
  • 6. With a DBMS, we have: data stored as bits on disks organized as files users of the data DBMS provides control and coordination to protect the data. DBMS applications
  • 7. data users of the data data dictionary data definition processor query processor security manager concurrency manager index manager application program(s) application program(s) application program(s) application program(s) internal/implementation view external/application view DBMS software components data description
  • 8. users of the data application program(s) application program(s) application program(s) application program(s) data data dictionary data definition processor query processor security manager concurrency manager index manager DDL: data definition language system configuration languages QL: query language DML: data manipulation language GPL: general purpose languages
  • 9. Anything you can do with a DBMS, you can do with a file system, a network and a heap of C code So why spend the money to buy a DBMS?  there is a well defined collection of capabilities common to a certain class of applications  for applications in this class, the DBMS already has these capabilities and probably does them better than you could with home-brewed code
  • 10.
  • 11. users of the data application program(s) application program(s) application program(s) application program(s) data data dictionary data definition processor query processor security manager concurrency manager index manager software operating between the data and the applications can provide many capabilities in a generic way
  • 12. A DBMS provides persistent objects, types and data structures  persistent = having a lifetime longer than the programs that use the data  any information that fits the data model of a particular DBMS can be made persistent with little effort  data model = concepts that can be used to describe the data
  • 13. A DBMS supports access by concurrent users  concurrent = happening at the same time  concurrent access, particularly writes (data changes), can result in inconsistent states (even when the individual operations are correct)  the DBMS can check the actual operations of concurrent users, to prevent activity that will lead to inconsistent states
  • 14. A DBMS can restrict access to authorized users  security policies often require control that is more fine-grained than that provided by a file system  since the DBMS understands the data structure, it can enforce fairly sophisticated and detailed security policies  on subsets of the data  on subsets of the available operations
  • 15. A DBMS can assist in controlling redundancy  redundancy = multiple copies of the same data  with file storage, it's often convenient to store multiple copies of the same data, so that it's "local" to other data and applications  this can cause many problems:  wasted disk space  inconsistencies  need to enter the data multiple times
  • 16. A DBMS supports representation of complex relationships and integrity constraints  the semantics (meaning) of an application often includes many relationships and rules about the relative values of subsets of the data  these further restrict the possible instances of the database  relationships and constraints can be defined as part of the schema
  • 17. A DBMS can provide backup and recovery  backup = snapshots of the data particular times  recovery = restoring the data to a consistent state after a system crash  the higher level semantics (relationships and constraints) can make it difficult to restore a consistent state  transaction analysis can allow a DBMS to reconstruct a consistent state from a number of backups
  • 18. A DBMS can support multiple user interfaces and user views  since the DBMS provides a well-defined data model and a persistent data dictionary, many different interfaces can be developed to access the same data  data independence ensures that these UIs will not be made invalid by most changes to the data  new user views can be supported as new schemas defined against the conceptual schema
  • 19. persistent objects, types and data structures control of concurrent users controlling of redundancy restricting access (security) representation of complex relationships and integrity constraints backup and recovery multiple user interfaces and user views
  • 20.
  • 21. users of the data application program(s) application program(s) application program(s) application program(s) data data dictionary data definition processor query processor security manager concurrency manager index manager database designer application developers system administrator (and DB designer) DBMS system developers
  • 22. Actors On the Scene (people interested in the actual data):  database administrators  database designers  systems analysts and application programmers  end users
  • 23. Database Administrators  acquiring a DBMS  managing the system  acquiring HW and SW to support the DBMS  authorizing access (security policies)  managing staff, including DB designers
  • 24. Database Designers  identifying the information of interested in the Universe of Discourse (UoD)  designing the database conceptual schema  designing views for particular users  designing the physical data layout and logical schema  adjusting data parameters for performance
  • 25. Systems Analysts and Application Programmers (generic database developers)  provide specialized knowledge to optimize database usage  provide generic (canned) application programs
  • 26. End Users  casual users: ad-hoc queries  naïve or parametric users: canned queries such as menus for a phone company customer service agent  sophisticated users: people who understand the system and the data and use it in many novel ways  standalone users: people who use personal easy-to-use databases for personal data
  • 27. Actors Behind the Scene: people who maintain the environment but aren't interested in the actual data  DBMS designers and implementers  tools developers  operators and maintenance personnel  database researchers
  • 28. DBMS designers and implementers  work for the company that supplies the DBMS (i.e. Microsoft , Oracle, Sybase, MySQL …)  programmers and engineers  design and implement the DBMS
  • 29. Tools Developers  design and implement DBMS add-ons or plug-ins  may work for DBMS supplier or be independent  kinds of tools: database design aids, performance monitoring tools, user and designer interfaces
  • 30. Operators and maintenance personnel  run and maintain the computer environment in which a DBMS operates  probably work for the database administrator (DBA)
  • 31. Database Researchers  academic or industrial researchers  develop new theory, new designs, new data models and new algorithms to improve future database management systems
  • 32.
  • 33. A database instance is the collective values of all database objects at some point in time  also called the (data) instance or (database) state A schema describes the database and defines the possible instances  also called the data definition, data dictionary, or meta-data
  • 34. A data model describes the possible schemas (essentially the meta-schema) A DBMS is designed around a particular data model  this is what allows all system components (and humans) to understand the schema and data possible data models  relational, object-oriented, object-relational, entity-relationship, semantic, network, hierarchical, etc.
  • 35. A physical data model describes the way in which data is stored in the computer  typically only of interest to database designers, implementers and maintainers …not end users  must provide a well-defined structure that can be mapped to the conceptual schema  allows optimization strategies to be defined generically
  • 36. External View External View External View Internal Schema Conceptual Schema generic view physical view user-specific views
  • 37. physical data independence  conceptual and external schema are defined in terms of the data model, rather than the actual data layout  ensures that conceptual and external schemas are not affected by changes to the physical data layout logical data independence  ensures that changes to the conceptual schema don't affect the external views  (this is not always achievable)