M.R.RAMASESHAM.R.RAMASESHA
DBMSDBMSThe Database Management The Database Management
SystemsSystemsbyby
-- 1 1 --Introduction to DBMSIntroduction to DBMS
33RamaseshaRamasesha MudigereMudigereCS 53CS 53
DData ata BBase ase MManagement anagement SSystem (ystem (DBMSDBMS))DataData
Database (DB)Database (DB)
1.1. Designed, built & populated for a specific purposeDesigned, built & populated for a specific purpose2.2. Representing some aspect of the real worldRepresenting some aspect of the real world3.3. Maintains data about the data ( A.k.a. Metadata )Maintains data about the data ( A.k.a. Metadata )
DBMS DBMS
Known facts that can be recorded Known facts that can be recorded Have an implicit meaningHave an implicit meaning
A shared Collection of logically related A shared Collection of logically related data and its relationships data and its relationships
AA software system that enables users to define software system that enables users to define create and maintain the database create and maintain the database Provides controlled access to the databaseProvides controlled access to the database
44RamaseshaRamasesha MudigereMudigereCS 53CS 53
Before DBMS Before DBMS ProgramProgram--Data DependenceData Dependence
–– All programs maintain metadata for each file they useAll programs maintain metadata for each file they useData Redundancy (Duplication of data)Data Redundancy (Duplication of data)
–– Different systems/programs have separate copies of the Different systems/programs have separate copies of the same datasame data
Limited Data SharingLimited Data Sharing–– No centralized control of dataNo centralized control of data
Lengthy Development TimesLengthy Development Times–– Programmers must design their own file formatsProgrammers must design their own file formats
Excessive Program MaintenanceExcessive Program Maintenance–– 80% of 80% of ofof information systems budgetinformation systems budget
55RamaseshaRamasesha MudigereMudigereCS 53CS 53
The Solution is The Solution is ……....AA
Central repository of shared data (& a description of Central repository of shared data (& a description of this data), this data),
Created managed and maintainedCreated managed and maintainedInIn
a standardized, convenient forma standardized, convenient formWithWith
Controlled Access to DataControlled Access to DataBy By
a controlling agent namelya controlling agent namely D B M SD B M S
Database Approach:Database Approach:
66RamaseshaRamasesha MudigereMudigereCS 53CS 53
Data Base Management SystemData Base Management SystemA DBMS is:A DBMS is:
A data storage and retrieval system A data storage and retrieval system which which
Permits data to be stored nonPermits data to be stored non--redundantly redundantly while while
Making it appear to the user as if the data is wellMaking it appear to the user as if the data is well--integratedintegrated
It also handles other functions like It also handles other functions like Data SecurityData SecurityRecovery & Recovery &
Concurrent Access by multiple usersConcurrent Access by multiple users
77RamaseshaRamasesha MudigereMudigereCS 53CS 53
What is DBMS ?What is DBMS ?
DBMSDBMS Databasecontainingcentralizedshared data
Application#1
Application#2
Application#3
Offers the following services:Data PersistenceDisk ManagementData SharingData ReliabilityAd hoc Queries
88RamaseshaRamasesha MudigereMudigereCS 53CS 53
Why DBMS ?Why DBMS ?1.1. Control of data redundancyControl of data redundancy2.2. Data consistencyData consistency3.3. More information from the same amount of dataMore information from the same amount of data4.4. Sharing of dataSharing of data5.5. Improved data integrityImproved data integrity6.6. Improved securityImproved security7.7. Enforcement of standardsEnforcement of standards8.8. Economy of scaleEconomy of scale
99RamaseshaRamasesha MudigereMudigereCS 53CS 53
Why DBMS ?Why DBMS ?9.9. Balanced conflicting requirementsBalanced conflicting requirements
10.10. Improved data accessibility and responsivenessImproved data accessibility and responsiveness
11.11. Increased productivityIncreased productivity
12.12. Improved maintenance through data independenceImproved maintenance through data independence
13.13. Increased concurrencyIncreased concurrency
14.14. Improved backup and recovery servicesImproved backup and recovery services
1010RamaseshaRamasesha MudigereMudigereCS 53CS 53
Why Not DBMS ?Why Not DBMS ?1.1. ComplexityComplexity
2.2. SizeSize
3.3. Cost of DBMSCost of DBMS
4.4. Additional hardware costsAdditional hardware costs
5.5. Cost of conversionCost of conversion
6.6. PerformancePerformance
7.7. Higher impact of a failureHigher impact of a failure
1111RamaseshaRamasesha MudigereMudigereCS 53CS 53
Who (is Who in) DBMS Who (is Who in) DBMS 1.1. Database Administrators Database Administrators
2.2. Database Designers Database Designers
3.3. Application programmersApplication programmers
4.4. End Users (naive and sophisticated)End Users (naive and sophisticated)
5.5. DBMS system designers & implementersDBMS system designers & implementers
6.6. TOOL DevelopersTOOL Developers
1212RamaseshaRamasesha MudigereMudigereCS 53CS 53
Who (is Who in) DBMS Who (is Who in) DBMS 1.1. Data Base Administrator (DBA) Data Base Administrator (DBA)
The central Authority in charge of DatabaseThe central Authority in charge of DatabaseHandles following functions:Handles following functions:
–– Creation of the Database Creation of the Database –– Upkeep and maintenance of the Database which Upkeep and maintenance of the Database which
includes:includes:1.1. Security and Access AuthorizationSecurity and Access Authorization2.2. Data Availability and Recovery from failuresData Availability and Recovery from failures3.3. Coordination & monitoring database usage,Coordination & monitoring database usage,4.4. Problem determination, performance tuning etcProblem determination, performance tuning etc
1313RamaseshaRamasesha MudigereMudigereCS 53CS 53
Who (is Who in) DBMS Who (is Who in) DBMS 2.2. Database DesignersDatabase Designers
The people who plan and decide the architectural The people who plan and decide the architectural and structural details of the Databaseand structural details of the DatabaseHandle following functionsHandle following functions
–– Identify the requirements Identify the requirements –– Decide on the architecture of DatabaseDecide on the architecture of Database–– Evolve the appropriate database structures that can Evolve the appropriate database structures that can
meet the usersmeet the users’’ Data Processing requirementsData Processing requirements–– Validate the design with User requirementsValidate the design with User requirements–– Document the design Document the design
1414RamaseshaRamasesha MudigereMudigereCS 53CS 53
Who (is Who in) DBMS Who (is Who in) DBMS 3.3. Application programmersApplication programmers
The people who access & manipulate data in DBMSThe people who access & manipulate data in DBMS–– Read and write data items from / to the database in a Read and write data items from / to the database in a
program & manipulate the data further in their programsprogram & manipulate the data further in their programs
Need to knowNeed to know1.1. How to Access and manipulate data in DB using the How to Access and manipulate data in DB using the
access interface provided by DBMS access interface provided by DBMS 2.2. Need to know how to use other programming tools Need to know how to use other programming tools
to generate necessary reports and outputsto generate necessary reports and outputs
1515RamaseshaRamasesha MudigereMudigereCS 53CS 53
Who (is Who in) DBMS Who (is Who in) DBMS 4.4. End Users (naive and sophisticated)End Users (naive and sophisticated)
The nonThe non--technical business people who need to use technical business people who need to use the database to carry out their day to day businessthe database to carry out their day to day businessNaNaïïve usersve users
–– Have no much knowledge of computer except filling Have no much knowledge of computer except filling screens and executing the prescreens and executing the pre--compiled programscompiled programs
–– Use preUse pre--packaged programs and procedures onlypackaged programs and procedures onlySophisticated usersSophisticated users
–– Capable of thinking new queries and formulate them Capable of thinking new queries and formulate them –– Have a reasonable technical knowledge to formulate Have a reasonable technical knowledge to formulate
Queries Queries
1616RamaseshaRamasesha MudigereMudigereCS 53CS 53
Who (is Who in) DBMS Who (is Who in) DBMS 5.5. DBMS system designers & implementersDBMS system designers & implementers
Hard core system software developers involved in Hard core system software developers involved in developing DBMS software systemdeveloping DBMS software systemDevelop DBMS to suit the needs of users and keep Develop DBMS to suit the needs of users and keep adding new features to make DBMS more friendly to adding new features to make DBMS more friendly to DBADBA’’ss and Application Programmersand Application ProgrammersNeed to have good knowledge of:Need to have good knowledge of:
–– Data structures and system programmingData structures and system programming–– Latest developments in Computer ScienceLatest developments in Computer Science–– Changing user requirements and new demands from the Changing user requirements and new demands from the
DBMS user communityDBMS user community
1717RamaseshaRamasesha MudigereMudigereCS 53CS 53
Who (is Who in) DBMS Who (is Who in) DBMS 6.6. TOOL DevelopersTOOL Developers
Hard core system software developers involved in Hard core system software developers involved in developing tools that make life easy for the DBMS developing tools that make life easy for the DBMS user communityuser communityDevelop tools to suit the needs of users and keep Develop tools to suit the needs of users and keep filling gaps left by the DBMS vendorfilling gaps left by the DBMS vendorNeed to have good knowledge of:Need to have good knowledge of:
–– The DBMS package and its gapsThe DBMS package and its gaps–– Good knowledge of the hardware & software platformGood knowledge of the hardware & software platform–– Changing user requirements and new demands from the Changing user requirements and new demands from the
DBMS user communityDBMS user community
1818RamaseshaRamasesha MudigereMudigereCS 53CS 53
Who (is Who in) DBMS Who (is Who in) DBMS 1.1. Database Administrators Database Administrators
2.2. Database Designers Database Designers
3.3. Application programmersApplication programmers
4.4. End Users (naive and sophisticated)End Users (naive and sophisticated)
5.5. DBMS system designers & implementersDBMS system designers & implementers
6.6. TOOL DevelopersTOOL Developers
1919RamaseshaRamasesha MudigereMudigereCS 53CS 53
Which DBMS ?Which DBMS ?1.1. Personal Database Personal Database
–– Standalone desktop databaseStandalone desktop database2.2. Workgroup Database Workgroup Database
–– Local area network (<25 users)Local area network (<25 users)3.3. Department Database Department Database
–– Local area network (25Local area network (25--100 users)100 users)4.4. Enterprise Database Enterprise Database
–– WideWide--area network (hundreds or thousands of users)area network (hundreds or thousands of users)5.5. Special Purpose databasesSpecial Purpose databases
–– Data Warehouses, Decision Support SystemsData Warehouses, Decision Support Systems
2020RamaseshaRamasesha MudigereMudigereCS 53CS 53
Range of Database ApplicationsRange of Database ApplicationsAdministration & ManagementAdministration & Management
–– Bank AccountsBank Accounts–– Company Stocks & PersonalCompany Stocks & Personal–– Airlines ReservationAirlines Reservation–– University Courses and NotesUniversity Courses and Notes–– Library Books BorrowingLibrary Books Borrowing
Engineering & Scientific Engineering & Scientific ApplicationsApplications
–– CAD/CAM/CIM/CAE/CASECAD/CAM/CIM/CAE/CASE–– Scientific ApplicationsScientific Applications–– Genome Databases, Genome Databases,
Geographic Info Systems Geographic Info Systems (GIS(GIS))
Telecom DatabasesTelecom Databases–– Network management, Network management, –– Telemedicine, Telemedicine, –– Info BrokeringInfo Brokering
Multimedia, Entertainment, Multimedia, Entertainment, VisualizationVisualization
–– Interactive, Virtual Reality Interactive, Virtual Reality basedbased
Data WarehousesData WarehousesWeb Site ManagementWeb Site ManagementElectronic CommerceElectronic Commerce
2121RamaseshaRamasesha MudigereMudigereCS 53CS 53
Range of Database ApplicationsRange of Database ApplicationsAdministration & ManagementAdministration & Management
–– Bank AccountsBank Accounts–– Company Stocks & PersonalCompany Stocks & Personal–– Airlines ReservationAirlines Reservation–– University Courses and NotesUniversity Courses and Notes–– Library Books BorrowingLibrary Books Borrowing
Engineering & Scientific Engineering & Scientific ApplicationsApplications
–– CAD/CAM/CIM/CAE/CASECAD/CAM/CIM/CAE/CASE–– Scientific ApplicationsScientific Applications–– Genome Databases, Genome Databases,
Geographic Info Systems Geographic Info Systems (GIS(GIS))
Telecom DatabasesTelecom Databases–– Network management, Network management, –– Telemedicine, Telemedicine, –– Info BrokeringInfo Brokering
Multimedia, Entertainment, Multimedia, Entertainment, VisualizationVisualization
–– Interactive, Virtual Reality Interactive, Virtual Reality basedbased
Data WarehousesData WarehousesWeb Site ManagementWeb Site ManagementElectronic CommerceElectronic Commerce
Wherever there is a need for Data Storage
Wherever there is a need for Data Storage
and retrieval
and retrieval
You find Database there as a handy tool
You find Database there as a handy tool
2222RamaseshaRamasesha MudigereMudigereCS 53CS 53
How DBMS ?How DBMS ?
2323RamaseshaRamasesha MudigereMudigereCS 53CS 53
Database Manager internal ModulesDatabase Manager internal Modules
2424RamaseshaRamasesha MudigereMudigereCS 53CS 53
1.1. External Level External Level -- UsersUsers’’ view of the databaseview of the database–– Describes part of database relevant to a particular Describes part of database relevant to a particular user(suser(s))
2.2. Conceptual Level Conceptual Level -- Community view of the databaseCommunity view of the database–– Describes data and its relationships independent of DBMSDescribes data and its relationships independent of DBMS
3.3. Internal Level Internal Level -- How the data is stored in the databaseHow the data is stored in the database1.1. LogicalLogical--schema:schema: Logical organization of data using the Logical organization of data using the
DBMS data model (tables, etc.)DBMS data model (tables, etc.)2.2. PhysicalPhysical--schema:schema: Physical organization of data in the Physical organization of data in the
secondary memory (files, records, etc.)secondary memory (files, records, etc.)The ability to modify a scheme definition in one level without The ability to modify a scheme definition in one level without
affecting a scheme definition in a higher level is calledaffecting a scheme definition in a higher level is calleddata independencedata independence
Three level ArchitectureThree level Architecture
2525RamaseshaRamasesha MudigereMudigereCS 53CS 53
Three level ArchitectureThree level Architecture
2626RamaseshaRamasesha MudigereMudigereCS 53CS 53
Three level ArchitectureThree level Architecture
2727RamaseshaRamasesha MudigereMudigereCS 53CS 53
Three level ArchitectureThree level ArchitecturePurposePurpose
–– All users should be able to access same dataAll users should be able to access same data–– A userA user’’s view is immune to changes made in other s view is immune to changes made in other
viewsviews–– Users should not need to know physical database Users should not need to know physical database
storage detailsstorage details–– DBA should be able to change database storage DBA should be able to change database storage
structures without affecting the usersstructures without affecting the users’’ viewsviews–– Internal structure of database should be unaffected by Internal structure of database should be unaffected by
changes to physical aspects of storagechanges to physical aspects of storage–– DBA should be able to change conceptual structure of DBA should be able to change conceptual structure of
database without affecting all usersdatabase without affecting all users
2828RamaseshaRamasesha MudigereMudigereCS 53CS 53
Functions of a DBMSFunctions of a DBMS1.1. Data Storage, Retrieval, and UpdateData Storage, Retrieval, and Update2.2. A UserA User--Accessible CatalogAccessible Catalog3.3. Transaction SupportTransaction Support4.4. Concurrency Control ServicesConcurrency Control Services5.5. Recovery ServicesRecovery Services6.6. Authorization ServicesAuthorization Services7.7. Support for Data CommunicationSupport for Data Communication8.8. Integrity ServicesIntegrity Services9.9. Services to Promote Data IndependenceServices to Promote Data Independence10.10. Utility ServicesUtility Services
2929RamaseshaRamasesha MudigereMudigereCS 53CS 53
DBMS Types DBMS Types -- 111.1. Hierarchical DBMSHierarchical DBMS
–– Introduced by IBM in 1965 as IMS Introduced by IBM in 1965 as IMS
–– Became popular in IBM world because of IBMBecame popular in IBM world because of IBM’’s backings backing
–– Uses natural hierarchy of data relationshipsUses natural hierarchy of data relationships
–– BUTBUT
–– Supports 1:M relationship only ( M:N not supported)Supports 1:M relationship only ( M:N not supported)
–– Data Access is navigational ( No adData Access is navigational ( No ad--hoc queries)hoc queries)
3030RamaseshaRamasesha MudigereMudigereCS 53CS 53
DBMS Types DBMS Types -- 222.2. Network DBMSNetwork DBMS
–– Introduced by Honeywell in 65 & standardized by Introduced by Honeywell in 65 & standardized by CODASYL in 1971CODASYL in 1971
–– Implemented on large variety of systemsImplemented on large variety of systems–– Supports complex data relationships & efficient Supports complex data relationships & efficient
accesses with least redundancyaccesses with least redundancy–– BUTBUT–– Data Access is navigationalData Access is navigational–– Needs skilled programmers to manageNeeds skilled programmers to manage–– Lacks flexibility to support changing needsLacks flexibility to support changing needs
3131RamaseshaRamasesha MudigereMudigereCS 53CS 53
DBMS Types DBMS Types -- 332.2. Relational DBMSRelational DBMS
TABLEROW
COLUMN
VALUE
– Introduced by E.F.Codd in 1971– Implemented on large variety of systems– Very popular because of its simplicity and flexibility– Based on sound mathematical principles – BUT– Data Relationship storage is weak– Uses up lot of hardware resources – No support for complex data types
3232RamaseshaRamasesha MudigereMudigereCS 53CS 53
DBMS Types DBMS Types -- 442.2. Object DBMSObject DBMS
– Introduced since 1995 & still evolving area– Comes in 2 flavors – OODBMS & ORDBMS– Several implementations of both flavors– Provides support for working with persistent objects– Useful for new generation applications – BUT– Yet to establish as mainstream databases– Lack scalability and understandability– Standards are still evolving
3333RamaseshaRamasesha MudigereMudigereCS 53CS 53
Centralized DBMS Architecture Centralized DBMS Architecture Conventional Teleprocessing ArchitectureConventional Teleprocessing Architecture
–– Single mainframe with a number of terminals attachedSingle mainframe with a number of terminals attached
3434RamaseshaRamasesha MudigereMudigereCS 53CS 53
Client Server DBMS ArchitectureClient Server DBMS ArchitectureServer holds the database and the DBMSServer holds the database and the DBMSClient manages user interface and runs applicationsClient manages user interface and runs applications
Advantages include:– Wider access to existing
databases– Increased performance– Possible reduction in
hardware costs– Reduction in communication
costs– Increased consistency
3535RamaseshaRamasesha MudigereMudigereCS 53CS 53
Evolution of DB SystemsEvolution of DB SystemsFlat files Flat files -- 1960s 1960s -- 1980s1980sHierarchical Hierarchical –– 1970s 1970s -- 1990s1990sNetwork Network –– 1970s 1970s -- 1990s1990sRelational Relational –– 1980s 1980s -- presentpresentObjectObject--oriented oriented –– 1990s 1990s -- presentpresentObjectObject--relational relational –– 1990s 1990s -- presentpresentData warehousing Data warehousing –– 1980s 1980s -- presentpresentWebWeb--enabled enabled –– 1990s 1990s -- presentpresent
3636RamaseshaRamasesha MudigereMudigereCS 53CS 53
Any Questions Any Questions ????????
Thank youThank you