Lecture 1 6th edition, Addison-Wesley, 2014 Database...
Transcript of Lecture 1 6th edition, Addison-Wesley, 2014 Database...
ITM661 – Database Systems
Lecture 1 Database Systems
• T. Connolly, and C. Begg, “Database Systems: A Practical Approach to Design, Implementation, and Management”, 5th edition, Addi W l 2009 6th diti Addi W l 2014 ISBN 0 132 94326 3 (I t ti l Editi )
DATABASE SYSTEMS Lecture 1: Introduction to DBs 1
Addison-Wesley, 2009. 6th edition, Addison-Wesley, 2014, ISBN: 0-132-94326-3, (International Edition).• R. Elmasri and S. B. Navathe, “Fundamentals of Database Systems”, 5th ed., Pearson, 2007, ISBN: 0-321-41506-X.
TextbooksDatabase Systems: A Practical Approach to Design, Implementation, and Management
By T. Connolly, and C. Begg, 6th edition, Addison-Wesley, 2014ISBN: 0-132-94326-3ISBN: 0-132-94326-3OR5th edition, Addison-Wesley, 2009ISBN-10: 0-321-60110-6, ISBN-13: 978-0-321-60110-0
Fundamentals of Database SystemsBy R. Elmasri and S. B. Navathe, 6th edition Pearson (Addison & Wesley) 20106th edition, Pearson (Addison & Wesley), 2010, ISBN: 0-136-08620-9
DATABASE SYSTEMS Lecture 1: Introduction to DBs 2
Office Hours and Gradingg Content
Database and applications; D b d l lif l Database system development lifecycle;
Data modeling; Relational model; Database languages; Design methodology; Normalization; ; Monitoring and tuning the operational systems.
Grading: Attendance 8%Attendance 8%Assignment/project 20% (TT)Project 12% (SB)Class activities 10% (SB)Class activities 10% (SB)Midterm 25% (TT)Final 25% (SB)
DATABASE SYSTEMS Lecture 1: Introduction to DBs 3
Course Outline
ITS322 - DBMSs Lecture 1: Introduction to DBs and DB Env. 4DATABASE SYSTEMS 4Lecture 1: Introduction to DBs
ITM661 – Database Systems
Lecture 1 Introduction to Databases SystemsDatabases Systems
• T. Connolly, and C. Begg, “Database Systems: A Practical Approach to Design, Implementation, and Management”, 5th edition, Addi W l 2009 6th diti Addi W l 2014 ISBN 0 132 94326 3 (I t ti l Editi )
DATABASE SYSTEMS Lecture 1: Introduction to DBs 5
Addison-Wesley, 2009. 6th edition, Addison-Wesley, 2014, ISBN: 0-132-94326-3, (International Edition).• R. Elmasri and S. B. Navathe, “Fundamentals of Database Systems”, 5th ed., Pearson, 2007, ISBN: 0-321-41506-X.
Objectivesj Some common uses of database systems The characteristics of file-based systems The problems with the file-based approachThe problems with the file based approach The benefits of database approach
Th i f h d b d b The meaning of the terms database, database systems, database management system (DBMS)
The typical functions of a DBMS The advantages and disadvantages of DBMSs The advantages and disadvantages of DBMSs
DATABASE SYSTEMS Lecture 1: Introduction to DBs 6
Objectivesj The major components of the DBMS environment
h l i l d i h i The personnel involved in the DBMS environment Difference between data administration and database
d i i iadministration Types of database systems System Catalog and Information Resource Dictionary
System (IRDS) Purposes and the origin of the 3-level database
architecture Concepts and types of data models Functions and components of a DBMS
DATABASE SYSTEMS Lecture 1: Introduction to DBs 7
p
Data Versus Information Data constitute building blocks of information Information produced by processing data Information reveals meaning of dataInformation reveals meaning of data Good, timely, relevant information key to
decision makingdecision making Good decision making key to organizational
survival
DATABASE SYSTEMS Lecture 1: Introduction to DBs 8
Where is Database? The database (DB) is now such an integral part
our day to day life that often we are not aware weour day-to-day life that often we are not aware we are using one.E k t dit d t l t lib Ex: supermarket, credit card, travel agent, library, insurance, security systems, university.First applications focused on clerical tasksFirst applications focused on clerical tasks
Requests for information quickly followed File systems developed to address needs Data organized according to expected use Data Processing (DP) specialists computerized manual
file systems
DATABASE SYSTEMS Lecture 1: Introduction to DBs 9
Types of Databases and DB Applicationsyp pp Traditional Applications: Numeric and Textual Databases
More Recent Applications:pp Multimedia Databases Geographic Information Systems (GIS) Geographic Information Systems (GIS) Data Warehouses Real time and Active Databases Real-time and Active Databases Many other applications
DATABASE SYSTEMS Lecture 1: Introduction to DBs 10
File-based Systemsy The file-based system is the predecessor of the
d t b t D t li ddatabase system. Decentralized A collection of application programs that perform
services for the end users (e.g. reports). Each program defines and manages its own data Each program defines and manages its own data. File-based systems were an early attempt to
t i th l fili tcomputerize the manual filing system. The related topics: storage, security, indexing,
cross-reference, processing
DATABASE SYSTEMS Lecture 1: Introduction to DBs 11
Simple File-based Systemp y
DATABASE SYSTEMS Lecture 1: Introduction to DBs 12
File-based Processingg
DATABASE SYSTEMS Lecture 1: Introduction to DBs 13
File-based System Critique (I)y q ( ) File-based System Data Management Requires extensive programming in third-generation
language (3GL) Time consuming Makes ad hoc queries impossible Leads to islands of information
Data Raw FactsField Group of characters with specific meaningRecord Logically connected fields that describe a person, place, or thingFile Collection of related records
DATABASE SYSTEMS Lecture 1: Introduction to DBs 14
File-based System Critique (II)y q ( ) Data Dependence File structure is defined in the program code. Change in file’s data characteristics requires
modification of data access programs Must tell program what to do and how Makes file systems cumbersome from programming
and data management views Structural Dependence Change in file structure requires modification of related Change in file structure requires modification of related
programs
DATABASE SYSTEMS Lecture 1: Introduction to DBs 15
File-based System Critique (III)y q ( ) Field Definitions and Naming Conventions
Fl ibl d d fi iti ti i t ti Flexible record definition anticipates reporting requirements
Selection of proper field names important Selection of proper field names important Attention to length of field names Use of unique record identifiers Use of unique record identifiers
Data RedundancyDiff d fli i i f d Different and conflicting versions of same data
Results of uncontrolled data redundancyD li Data anomalies
Data inconsistency
DATABASE SYSTEMS Lecture 1: Introduction to DBs 16
File-based System Critique (IV)y q ( ) Separation and isolation of data Each program maintains its own set of data. Users of
one program may be unaware of potentially useful data h ld b thheld by other programs.
Incompatible file formats Programs are written in different languages, and so
cannot easily access each others files. Fixed Queries/Proliferation of application
programsprograms Programs are written to satisfy particular functions.
Any new requirement needs a new program
DATABASE SYSTEMS Lecture 1: Introduction to DBs 17
Any new requirement needs a new program.
Database Approachpp Arose because: Definition of data was embedded in application
programs, rather than being stored separately and i d d tlindependently.
No control over access and manipulation of data b d h i d b li ibeyond that imposed by application programs.
Result - the database and Database Management System (DBMS).
DATABASE SYSTEMS Lecture 1: Introduction to DBs 18
Database Managementg Database is shared, integrated computer structure
h ihousing: End user data Metadata
Database Management System (DBMS)Database Management System (DBMS) Manages Database structure Controls access to data Controls access to data Contains query language
DATABASE SYSTEMS Lecture 1: Introduction to DBs 19
Database A shared collection of logically related data (and
d i ti f thi d t ) d i d t t tha description of this data), designed to meet the information needs of an organization.
System catalog (data dictionary or metadata) provides the description of the data to enable p pprogram–data independence.
Logically related data comprises entities Logically related data comprises entities, attributes, and relationships of an organization's i f tiinformation.
DATABASE SYSTEMS Lecture 1: Introduction to DBs 20
Database Systems & DBMSy Database System A system that occupies a database as a basic storage Provides the following advantages over file-based
systems Eliminates inconsistency, data anomalies, data dependency,
d t t l d d bland structural dependency problems Stores data structures, relationships, and access paths
D b M S (DBMS) Database Management Systems (DBMS) A software system that enables users to define, create,
and maintain the database and which provides controlled access to this database.
DATABASE SYSTEMS Lecture 1: Introduction to DBs 21
Simplified Database System Environmentp y
DATABASE SYSTEMS Lecture 1: Introduction to DBs 22
Database vs. File Systemsy
DATABASE SYSTEMS Lecture 1: Introduction to DBs 23
DBMS Manages Interactiong
DATABASE SYSTEMS Lecture 1: Introduction to DBs 24
Database Management System (DBMS)
DATABASE SYSTEMS Lecture 1: Introduction to DBs 25
Typical DBMS Functionalityyp y Define a particular database in terms of its data types,
structures and constraintsstructures, and constraints Construct or Load the initial database contents on a
secondary storage mediumsecondary storage medium Manipulating the database:
R t i l Q i ti t Retrieval: Querying, generating reports Modification: Insertions, deletions and updates to its content Accessing the database through Web applications Accessing the database through Web applications
Processing and Sharing by a set of concurrent users and application programs yet keeping all data valid andapplication programs – yet, keeping all data valid and consistent
DATABASE SYSTEMS Lecture 1: Introduction to DBs 26
Typical DBMS Functionalityyp y Other features: Protection or Security measures to prevent
unauthorized access “Active” processing to take internal actions on data Presentation and Visualization of data Maintaining the database and associated programs over
the lifetime of the database application Called database, software, and system maintenance
DATABASE SYSTEMS Lecture 1: Introduction to DBs 27
Functions of a DBMS (I)( ) Data Storage, Retrieval and Update. Must furnish users with the ability to store, retrieve,
and update data in the database. A User-Accessible Catalog. Must furnish a catalog in which descriptions of data g p
items are stored and which is accessible to users. Transaction Support Transaction Support Must furnish a mechanism to ensure that either
(1) all the updates corresponding to a given transaction are made(1) all the updates corresponding to a given transaction are madeor (2) none of them are made
DATABASE SYSTEMS Lecture 1: Introduction to DBs 28
(2) none of them are made.
Functions of a DBMS (II)( ) Concurrency Control Services Must furnish a mechanism to ensure that database is
updated correctly when multiple users are updating the d t b tldatabase concurrently.
Recovery Services Must furnish a mechanism for recovering the database
in the event that the database is damaged in any way. Authorization Services & Security management Must furnish a mechanism to ensure that only Must furnish a mechanism to ensure that only
authorized users can access the database.
DATABASE SYSTEMS Lecture 1: Introduction to DBs 29
Functions of a DBMS (III)( ) Support for Data Communication
M t b bl f i t ti ith i ti Must be capable of integrating with communication software.
I t it S i & Sec rit management Integrity Services & Security management Must furnish a means to ensure that both the data in the
database and changes to the data follow certain rulesdatabase and changes to the data follow certain rules. Services to Promote Data Independence
i l d f ili i h i d d f Must include facilities to support the independence of programs from the actual structure of the database.
Utilit S i Utility Services Should provide a set of utility services.
DATABASE SYSTEMS Lecture 1: Introduction to DBs 30
Functions of a DBMS (IV)( ) Data transformation and presentation Backup and recovery management Database language and application Database language and application
programming interfaces A view mechanism. Provides users with only the data they want Provides users with only the data they want
or need to use.
DATABASE SYSTEMS Lecture 1: Introduction to DBs 31
Components of a DBMSp
1. Query processor2. Database manager (DM)3. File manager4 DML preprocessor4. DML preprocessor5. DDL compiler6. Catalog manager
DATABASE SYSTEMS Lecture 1: Introduction to DBs 32
g g
Components of Database Manager (DM)
1. Authorization control2. Command processor3 I t it h k3. Integrity checker4. Query optimizer5 Transaction manager5. Transaction manager6. Scheduler7. Recovery manager8. Buffer manager
DATABASE SYSTEMS Lecture 1: Introduction to DBs 33
Advantages of Using DB Approach (I)g g pp ( ) Controlling redundancy in data storage and in
d l t d i t ff tdevelopment and maintenance efforts. Sharing of data among multiple users.
Restricting unauthorized access to data. Providing persistent storage for program Objects Providing persistent storage for program Objects Object-oriented DBMSs P idi S S ( i d ) f Providing Storage Structures (e.g. indexes) for efficient Query Processing
DATABASE SYSTEMS Lecture 1: Introduction to DBs 34
Advantages of Using DB Approach (II)g g pp ( ) Providing backup and recovery services. Providing multiple interfaces to different classes
of users. Representing complex relationships among data. Enforcing integrity constraints on the database Enforcing integrity constraints on the database. Drawing inferences and actions from the stored
data using deductive and active rules
DATABASE SYSTEMS Lecture 1: Introduction to DBs 35
Additional Implications of DB Approach (I)p pp ( ) Potential for enforcing standards: This is very crucial for the success of database
applications in large organizations. Standards refer to data item names, display formats,
screens, report structures, meta-data (description of d ) W b ldata), Web page layouts, etc.
Reduced application development time: Incremental time to add each new application is
reduced.
DATABASE SYSTEMS Lecture 1: Introduction to DBs 36
Additional Implications of DB Approach (II)p pp ( ) Flexibility to change data structures: Database structure may evolve as new requirements are
defined. Availability of current information: Extremely important for on-line transaction systems y p y
such as airline, hotel, car reservations. Economies of scale: Economies of scale: Wasteful overlap of resources and personnel can be
avoided by consolidating data and applications acrossavoided by consolidating data and applications across departments.
DATABASE SYSTEMS Lecture 1: Introduction to DBs 37
Disadvantages of DBMSg Complexity
i Size Cost of DBMS Additional hardware costs
Cost of conversion Cost of conversion Performance Higher impact of a failure
DATABASE SYSTEMS Lecture 1: Introduction to DBs 38
When not to use a DBMS Main inhibitors (costs) of using a DBMS:
High initial investment and possible need for additional hardware.g p Overhead for providing generality, security, concurrency control,
recovery, and integrity functions.
When a DBMS may be unnecessary: If the database and applications are simple, well defined, and not
expected to change. If there are stringent real-time requirements that may not be met
because of DBMS overheadbecause of DBMS overhead. If access to data by multiple users is not required. If the database system is not able to handle the complexity of data If the database system is not able to handle the complexity of data
because of modeling limitations If the DB users need special operations not supported by the DBMS.
DATABASE SYSTEMS Lecture 1: Introduction to DBs 39
Example of a DBp Some mini-world relationships:
SECTION f ifi COURSE SECTIONs are of specific COURSEs STUDENTs take SECTIONs COURSEs have prerequisite COURSEs COURSEs have prerequisite COURSEs INSTRUCTORs teach SECTIONs COURSEs are offered by DEPARTMENTs COURSEs are offered by DEPARTMENTs STUDENTs major in DEPARTMENTs
Note: The above entities and relationships are typically expressed in a conceptual data model such as theexpressed in a conceptual data model, such as the ENTITY-RELATIONSHIP data model (learn more later)
DATABASE SYSTEMS Lecture 1: Introduction to DBs 40
A Simple Database (I)p ( )
DATABASE SYSTEMS Lecture 1: Introduction to DBs 41
A Simple Database (II)p ( )
DATABASE SYSTEMS Lecture 1: Introduction to DBs 42
Main Characteristics of the DB Approachpp Self-describing nature of a database system:
A DBMS l h d i i f i l A DBMS catalog stores the description of a particular database (e.g. data structures, types, and constraints)The description is called meta data The description is called meta-data.
This allows the DBMS software to work with different database applicationsdatabase applications.
Insulation between programs and data:C ll d d t i d d Called program-data independence.
Allows changing data structures and storage organization without having to change the DBMS access programswithout having to change the DBMS access programs.
DATABASE SYSTEMS Lecture 1: Introduction to DBs 43
A Simplified Database Catalog
DATABASE SYSTEMS Lecture 1: Introduction to DBs 44
Main Characteristics of DB Approach (I)pp ( ) Data Abstraction: A data model is used to hide storage details and
present the users with a conceptual view of the database.
Programs refer to the data model constructs rather gthan data storage details
Support of multiple views of the data: Support of multiple views of the data: Each user may see a different view of the database,
hi h d ib l th d t f i t t t th twhich describes only the data of interest to that user.
DATABASE SYSTEMS Lecture 1: Introduction to DBs 45
Main Characteristics of DB Approach (II)pp ( ) Sharing of data and multi-user transaction
iprocessing: Allowing a set of concurrent users to retrieve from and to
update the database. Concurrency control within the DBMS guarantees that each
i i l d b dtransaction is correctly executed or aborted Recovery subsystem ensures each completed transaction has
it ff t tl d d i th d t bits effect permanently recorded in the database OLTP (Online Transaction Processing) is a major part of
database applications This allows hundreds of concurrentdatabase applications. This allows hundreds of concurrent transactions to execute per second.
DATABASE SYSTEMS Lecture 1: Introduction to DBs 46
DBMS Environment(Major components)(Major components)
HardwareC f PC t t k f t Can range from a PC to a network of computers.
Software DBMS, operating system, network software (if necessary) and also DBMS, operating system, network software (if necessary) and also
the application programs. Data
Used by the organization and a description of this data called the schema.
ProceduresProcedures Instructions and rules that should be applied to the design and use
of the database and DBMS.
DATABASE SYSTEMS Lecture 1: Introduction to DBs 47
People
Database Users Users may be divided into Actors on the Scene Actors on the Scene Those who actually use and control the database content,
and those who design, develop and maintain database g , papplications. Data Administrator (DA) Database Administrator (DBA) Database Designers (Logical and Physical) Application Programmers Application Programmers End Users (native and sophisticated)
Workers Behind the Scene Workers Behind the Scene Those who design and develop the DBMS software and
related tools and the computer systems operators
DATABASE SYSTEMS Lecture 1: Introduction to DBs 48
related tools, and the computer systems operators.
Users in DB System Environment
DATABASE SYSTEMS Lecture 1: Introduction to DBs 49
Data Administration vs. Database AdministrationDatabase Administration
Data Administration The management of the data resource, which includes
database planning, development and maintenance of d d li i d d d l dstandards, policies and procedures, and conceptual and
logical database design.
D b Ad i i i Database Administration The management of the physical realization of a
database application, which includes physical database design and implementation, setting security and integrity controls, monitoring system performance, and reorganizing the database, as necessary.
DATABASE SYSTEMS Lecture 1: Introduction to DBs 50
Data Administration Tasks
DATABASE SYSTEMS Lecture 1: Introduction to DBs 51
Database Administration Tasks
DATABASE SYSTEMS Lecture 1: Introduction to DBs 52
DA and DBA – Main Task Differences.
DATABASE SYSTEMS Lecture 1: Introduction to DBs 53
Database System Typesy yp Single-user vs. Multi-user Database
Desktop Desktop Workgroup Enterprise
Centralized vs. Distributed Usage Purposeg p
Production or transactional Decision support or data warehouse
Multi-user DBMS Architecture Teleprocessing
Fil File-server Client-server
DATABASE SYSTEMS Lecture 1: Introduction to DBs 54
Teleprocessingp g Traditional architecture. Single mainframe with a number of terminals Trend is now towards downsizing.Trend is now towards downsizing.
DATABASE SYSTEMS Lecture 1: Introduction to DBs 55
File-server File-server is connected to several workstations
t kacross a network. Database resides on file-server. DBMS and applications run on each workstation. Disadvantages include: Disadvantages include: Significant network traffic. Copy of DBMS on each workstation. Concurrency, recovery and integrity control more
complex.
DATABASE SYSTEMS Lecture 1: Introduction to DBs 56
File-server Architecture
DATABASE SYSTEMS Lecture 1: Introduction to DBs 57
Client-server Server holds the database and the DBMS. Client manages the user interface and runs
applications. Advantages include: Wider access to existing databases Wider access to existing databases. Increased performance.
P ibl d ti i h d t Possible reduction in hardware costs. Reduction in communication costs. Increased consistency.
DATABASE SYSTEMS Lecture 1: Introduction to DBs 58
Client-server Architecture
DATABASE SYSTEMS Lecture 1: Introduction to DBs 59
Alternative Client-server Topologies
DATABASE SYSTEMS Lecture 1: Introduction to DBs 60
Summary of Client-server Functions
DATABASE SYSTEMS Lecture 1: Introduction to DBs 61
DBMS Server Provides database query and transaction services to the
clientsclients Relational DBMS servers are often called SQL servers,
query servers, or transaction serversq y , Applications running on clients utilize an Application
Program Interface (API) to access server databases via standard interface such as: ODBC: Open Database Connectivity standard
JDBC f J i JDBC: for Java programming access Client and server must install appropriate client module
and server module software for ODBC or JDBCand server module software for ODBC or JDBC
DATABASE SYSTEMS Lecture 1: Introduction to DBs 62
Two Tier Client-Server Architecture A client program may connect to several DBMSs,
ti ll d th d tsometimes called the data sources. In general, data sources can be files or other non-
DBMS software that manages data. Other variations of clients are possible: e g in Other variations of clients are possible: e.g., in
some object DBMSs, more functionality is transferred to clients including data dictionarytransferred to clients including data dictionary functions, optimization and recovery across
lti l tmultiple servers, etc.
DATABASE SYSTEMS Lecture 1: Introduction to DBs 63
Three Tier Client-Server Architecture Common for Web applications
I t di t L ll d A li ti S W b Intermediate Layer called Application Server or Web Server:
St th b ti it ft d th b i l i t Stores the web connectivity software and the business logic part of the application used to access the corresponding data from the database server
Acts like a conduit for sending partially processed data between the database server and the client.
Three-tier Architecture Can Enhance Security: Database server only accessible via middle tier Clients cannot directly access database server
DATABASE SYSTEMS Lecture 1: Introduction to DBs 64
Three-tier client-server architecture
DATABASE SYSTEMS Lecture 1: Introduction to DBs 65
Three-Tier Client-Server Client side presented two problems preventing
t l bilittrue scalability: ‘Fat’ client, requiring considerable resources on client’s
ff i lcomputer to run effectively. Significant client side administration overhead.
By 1995, three layers proposed, each potentially running on a different platformrunning on a different platform.
Pearson Education © 2014 66
Three-Tier Client-Server Advantages:
‘Thin’ client, requiring less expensive hardware. Application maintenance centralized. Easier to modify or replace one tier without affecting others. Separating business logic from database functions makes it
i i l l d b l ieasier to implement load balancing. Maps quite naturally to Web environment.
Pearson Education © 2014 67
Three-Tier Client-Server
Pearson Education © 2014 68
Transaction Processing Monitorsg Program that controls data transfer between
li t d i d t id i t tclients and servers in order to provide a consistent environment, particularly for Online Transaction Processing (OLTP).
69Pearson Education © 2014
TPM as middle tier of 3-tier client-server
Pearson Education © 2014 70
System Catalogy g A repository of information (metadata) describing
th d t i th d t bthe data in the database. Typically stores:
Names of authorized users. Names of data items in the database. Constraints on each data item. Data items accessible by a user and the type of access.y yp
It is used by modules such as: Authorization Control Authorization Control. Integrity Checker.
DATABASE SYSTEMS Lecture 1: Introduction to DBs 71
Information Resource Dictionary System (IRDS)(IRDS)
Response to an attempt to standardize data dictionary interfacesinterfaces.
An IRDS is a software tool that can be used to control and document an organization’s information resourcesdocument an organization s information resources.
It provides a definition for the tables that comprise the data dictionary and the operations that can be used todata dictionary and the operations that can be used to access these tables.Obj ti Objectives: Extensibility of data Integrity of data Integrity of data Controlled access to data
DATABASE SYSTEMS Lecture 1: Introduction to DBs 72
IRDS Services Interface
DATABASE SYSTEMS Lecture 1: Introduction to DBs 73
Three-Level Architecture of a DB system (Objective)(Objective) All users should be able to access same data.
A ' i i i t h d i th i A user's view is immune to changes made in other views. Users should not need to know physical database storage
d ildetails. DBA should be able to change database storage structures
i h ff i h ' iwithout affecting the users' views. Internal structure of database should be unaffected by
changes to physical aspects of storage. DBA should be able to change conceptual structure of
database without affecting all users.
DATABASE SYSTEMS Lecture 1: Introduction to DBs 74
ANSI-SPARC Three-level Architecture
DATABASE SYSTEMS Lecture 1: Introduction to DBs 75
ANSI-SPARC Three-level Architecture
External Level Users' view of the database. Describes that part of
database that is relevant to a particular user.
Conceptual Level Community view of the database Describes what data Community view of the database. Describes what data
is stored in database and relationships among the data.
I t l L l Internal Level Physical representation of the database on the
computer. Describes how the data is stored in the database.
DATABASE SYSTEMS Lecture 1: Introduction to DBs 76
Difference between Three levels
DATABASE SYSTEMS Lecture 1: Introduction to DBs 77
Data Independence and the ANSI-SPARC 3 l l A hit t3-level Architecture
DATABASE SYSTEMS Lecture 1: Introduction to DBs 78
Data Independencep Logical Data Independence
Th it t h th t l h ith t h i t The capacity to change the conceptual schema without having to change the external schemas and their associated application programs.p g
Conceptual schema changes e.g. addition/removal of entities. Should not require changes to external schema or rewrites of
application programs.
Physical Data Independence The capacity to change the internal schema without having to
change the conceptual schema.Internal schema changes e g sing different file organi ations Internal schema changes e.g. using different file organizations, storage structures/devices.
Should not require change to conceptual or external schemas.
DATABASE SYSTEMS Lecture 1: Introduction to DBs 79
Should not require change to conceptual or external schemas.
Historical Development of DB Tech. (I)p ( ) Early Database Applications:
Th Hi hi l d N t k M d l i t d d i id The Hierarchical and Network Models were introduced in mid 1960s and dominated during the seventies.
A bulk of the worldwide database processing still occurs using A bulk of the worldwide database processing still occurs using these models, particularly, the hierarchical model.
Relational Model based Systems:y Relational model was originally introduced in 1970, was heavily
researched and experimented within IBM Research and several i i iuniversities.
Relational DBMS Products emerged in the early 1980s.
DATABASE SYSTEMS Lecture 1: Introduction to DBs 80
Historical Development of DB Tech. (II)p ( ) Object-oriented and emerging applications:
Obj t O i t d D t b M t S t (OODBMS ) Object-Oriented Database Management Systems (OODBMSs) were introduced in late 1980s and early 1990s to cater to the need of complex data processing in CAD and other applications.p p g pp Their use has not taken off much.
Many relational DBMSs have incorporated object database l di ll d b l lconcepts, leading to a new category called object-relational
DBMSs (ORDBMSs) Extended relational systems add further capabilities (e g for Extended relational systems add further capabilities (e.g. for
multimedia data, XML, and other data types)
DATABASE SYSTEMS Lecture 1: Introduction to DBs 81
Historical Development of DB Tech. (III)p ( ) Data on the Web and E-commerce Applications:
W b t i d t i HTML (H t t k Web contains data in HTML (Hypertext markup language) with links among pages.
This has given rise to a new set of applications and E This has given rise to a new set of applications and E-commerce is using new standards like XML (eXtended Markup Language). p g g )
Script programming languages such as PHP and JavaScript allow generation of dynamic Web pages that are partially generated from a database.
Also allow database updates through Web pages
DATABASE SYSTEMS Lecture 1: Introduction to DBs 82
Extending Database Capabilitiesg p New functionality is being added to DBMSs in the following areas:
Scientific Applicationspp XML (eXtensible Markup Language) Image Storage and Management
Audio and Video Data Management Audio and Video Data Management Data Warehousing and Data Mining Spatial Data Management Time Series and Historical Data Management
The above gives rise to new research and development in incorporating The above gives rise to new research and development in incorporating new data types, complex data structures, new operations and storage and indexing schemes in database systems.
DATABASE SYSTEMS Lecture 1: Introduction to DBs 83
Data Models (I)( ) Data Model:
A set of concepts to describe the structure of a database the A set of concepts to describe the structure of a database, the operations for manipulating these structures, and certain constraints that the database should obey.constraints that the database should obey.
Data Model Structure and Constraints: Constructs are used to define the database structure Constructs are used to define the database structure Constructs typically include elements (and their data types)
as well as groups of elements (e.g. entity, record, table), and g p ( g y, , ),relationships among such groups
Constraints specify some restrictions on valid data; these constraints must be enforced at all times
DATABASE SYSTEMS Lecture 1: Introduction to DBs 84
Data Models (II)( ) Collection of concepts for describing data, relationships
between data and constraints on the data in anbetween data and constraints on the data in an organization.
Data Model comprises: Data Model comprises: A structural part
Consisting of a set of rules according to which databases can be Consisting of a set of rules according to which databases can be constructed.
A manipulative part Defining the types of operations that are allowed on the data
(update/retrieving data from the DB or changing the DB structure). Possibly a set of integrity rules Possibly a set of integrity rules
Ensuring that the data is accurate.
DATABASE SYSTEMS Lecture 1: Introduction to DBs 85
Data Models (III)( ) Data Model Operations: These operations are used for specifying database
retrievals and updates by referring to the constructs of th d t d lthe data model.
Operations on the data model may include basic model i ( i i d l d ) doperations (e.g. generic insert, delete, update) and user-
defined operations (e.g. compute_student_gpa, update inventory)update_inventory)
DATABASE SYSTEMS Lecture 1: Introduction to DBs 86
Data Models (IV) – Levels of Data Models( ) Conceptual (high-level, semantic) data models:
Provide concepts that are close to the way users perceive data Provide concepts that are close to the way users perceive data. (Also called entity-based or object-based data models.)
Physical (low-level, internal) data models: Physical (low level, internal) data models: Provide concepts that describe details of how data is stored in the
computer. These are usually specified in an ad-hoc manner through DBMS
design and administration manuals
Implementation (representational, logical) data models: Provide concepts that fall between the above two, used by many
i l DBMS i l t ti ( l ti l d t d lcommercial DBMS implementations (e.g. relational data models used in many commercial systems).
DATABASE SYSTEMS Lecture 1: Introduction to DBs 87
Data Models (V) – Types of Data Models( ) yp Types of Data Models
R d b d D M d l Record-based Data Models Object-based Data Models Physical Data Models
The first two models are used to describe data at the conceptual and Logical levels, the latter is for the internal level.
DATABASE SYSTEMS Lecture 1: Introduction to DBs 88
Data Models (VI)( ) Record-based Data Models
Hierarchical Data Model Network Data Model Relational Data ModelObject based Data Models Object-based Data Models Entity-Relationship Object-Orientedj Semantic or Functional
Physical Data ModelsPh i l d t d l d ib h d t i t d i th t Physical data models describe how data is stored in the computer, representing information such as record structures, record orderings, and access pathsTh t h i l d t d l l i l d t There are not as many physical data models as logical data models, the most common ones being the unifying model and the frame memory
DATABASE SYSTEMS Lecture 1: Introduction to DBs 89
Implementation Data Modelsp
1st generation
2nd generation
3nd ti3nd generation
DATABASE SYSTEMS Lecture 1: Introduction to DBs 90
Hierarchical Data Model (I)( ) Initially implemented in a joint effort by IBM and
N th A i R k ll d 1965 R lt d iNorth American Rockwell around 1965. Resulted in the IMS family of systems.
IBM’s IMS product had (and still has) a very large customer base worldwide
Hierarchical model was formalized based on the IMS system
Other systems based on this model: System 2k (SAS inc.))
DATABASE SYSTEMS Lecture 1: Introduction to DBs 91
Hierarchical Data Model (II)( ) Logically represented by an upside down tree
E h t h hild Each parent can have many children Each child has only one parent
DATABASE SYSTEMS Lecture 1: Introduction to DBs 92
Hierarchical Data Model (III)( ) Advantages: Conceptual simplicity simple to construct and operate Conceptual simplicity, simple to construct and operate Corresponds to a number of natural hierarchically
organized domains e g organization (“org”) chartorganized domains, e.g., organization ( org ) chart Language is simple:
U t t lik GET GET UNIQUE GET NEXT Uses constructs like GET, GET UNIQUE, GET NEXT, GET NEXT WITHIN PARENT, etc.
Database security and integrity Data independence Database security and integrity, Data independence, Efficiency
DATABASE SYSTEMS Lecture 1: Introduction to DBs 93
Hierarchical Data Model (IV)( ) Disadvantages: Navigational and procedural nature of processing Navigational and procedural nature of processing Database is visualized as a linear arrangement of
recordsrecords Little scope for "query optimization“
C l i l i i d Complex implementation, programming and use complexity
iffi l d l k f d d Difficult to manage and lack of standards Lacks structural independence Implementation limitations
DATABASE SYSTEMS Lecture 1: Introduction to DBs 94
Network Data Models (I) ( ) The first network DBMS was implemented by
H ll i 1964 65 (IDS S t )Honeywell in 1964-65 (IDS System). Adopted heavily due to the support by CODASYL
(Conference on Data Systems Languages) (CODASYL - DBTG report of 1971).
Later implemented in a large variety of systems -IDMS (Cullinet - now Computer Associates), DMS 1100 (Unisys), IMAGE (H.P. (Hewlett-Packard)), VAX -DBMS (Digital Equipment Corp., next COMPAQ, now H.P.).
DATABASE SYSTEMS Lecture 1: Introduction to DBs 95
Network Data Model (II)( ) Each record can have multiple parents Composed of sets Composed of sets Each set has owner record and member record Member may have several owners Member may have several owners
DATABASE SYSTEMS Lecture 1: Introduction to DBs 96
Network Data Model (III) – Another Example( ) p
DATABASE SYSTEMS Lecture 1: Introduction to DBs 97
Network Data Model (IV)( ) Advantages:
Able to model complex relationships and represents semantics of Able to model complex relationships and represents semantics of add/delete on the relationships.
Can handle most situations for modeling using record types and l i hirelationship types.
Language is navigational; uses constructs like FIND, FIND member, FIND owner, FIND NEXT within set, GET, etc. , , , , Programmers can do optimal navigation through the database.
Conceptual simplicity Data access flexibility Promotes database integrity Data independence Data independence Conformance to standards
DATABASE SYSTEMS Lecture 1: Introduction to DBs 98
Network Data Model (V)( ) Disadvantages: Lack of structural independence Navigational and procedural nature of processing System complexity, Database contains a complex array
of pointers that thread through a set of records. Little scope for automated “query optimization”
DATABASE SYSTEMS Lecture 1: Introduction to DBs 99
Relational Data Model (I) ( ) Proposed in 1970 by E.F. Codd (IBM), first commercial
system in 1981 82system in 1981-82. Now in several commercial products (e.g. DB2,
ORACLE MS SQL Server SYBASE INFORMIX)ORACLE, MS SQL Server, SYBASE, INFORMIX). Several free open source implementations, e.g. MySQL,
PostgreSQLPostgreSQL Currently most dominant for developing database
li tiapplications. SQL relational standards: SQL-89 (SQL1), SQL-92
(SQL2) SQL 99 SQL3(SQL2), SQL-99, SQL3, …
DATABASE SYSTEMS Lecture 1: Introduction to DBs 100
Relational Data Model (II)( ) Represented by a collection of tables (row/column) Tables related by sharing common entity characteristic(s)
DATABASE SYSTEMS Lecture 1: Introduction to DBs 101
Relational Data Model (III)( ) Advantages
St t l i d d Structural independence Improved conceptual simplicity
E i d t b d i i l t ti t Easier database design, implementation, management, and use
Ad hoc query capability with SQL Ad hoc query capability with SQL Powerful database management systemDi d t Disadvantages Substantial hardware and system software overhead
P d i d i l i i d Poor design and implementation is made easy May promote “islands of information” problems
DATABASE SYSTEMS Lecture 1: Introduction to DBs 102
Entity Relationship Data Modely p Complements the relational data model concepts Represented in an entity relationship diagram Represented in an entity relationship diagram
(ERD) Based on entities attributes and relationships Based on entities, attributes, and relationships
DATABASE SYSTEMS Lecture 1: Introduction to DBs 103
Entity Relationship Data Modely p Advantages
E ti l t l i li it Exceptional conceptual simplicity Visual representation
Eff ti i ti t l Effective communication tool Integrated with the relational database modelDi d Disadvantages Limited constraint representation Limited relationship representation No data manipulation language Loss of information content
DATABASE SYSTEMS Lecture 1: Introduction to DBs 104
Object-Oriented Data Model (I)j ( ) Several models have been proposed for implementing in a
database systemdatabase system. One set comprises models of persistent O-O
Programming Languages such as C++ (e g inProgramming Languages such as C++ (e.g., in OBJECTSTORE or VERSANT), and Smalltalk (e.g., in GEMSTONE)GEMSTONE).
Additionally, systems like O2, ORION (at MCC - then ITASCA) IRIS (at H P - used in Open OODB)ITASCA), IRIS (at H.P.- used in Open OODB).
Object Database Standard: ODMG-93, ODMG-version 2 0 ODMG version 3 02.0, ODMG-version 3.0.
DATABASE SYSTEMS Lecture 1: Introduction to DBs 105
Object-Oriented Data Model (II)j ( ) Objects or abstractions of real-world entities are
t dstored Attributes describe properties Collection of similar objects is a class
Methods represent real world actions of classes Classes are organized in a class hierarchy
Inheritance is ability of object to inherit attributes and methods of classes above it
DATABASE SYSTEMS Lecture 1: Introduction to DBs 106
Object-Oriented Data Model (III)j ( ) Advantages
Add ti t t Adds semantic content Visual presentation includes semantic content
D t b i t it Database integrity Both structural and data independenceDi d Disadvantages Lack of OODM Complex navigational data access Steep learning curve High system overhead slows transactions
DATABASE SYSTEMS Lecture 1: Introduction to DBs 107
OO Model vs. ER Model
DATABASE SYSTEMS Lecture 1: Introduction to DBs 108
Object-Relational Data Modelj Most Recent Trend. Started with Informix
U i l SUniversal Server. Relational systems incorporate concepts from
object databases leading to object-relational. Exemplified in the latest versions of Oracle-10i Exemplified in the latest versions of Oracle 10i,
DB2, and SQL Server and other DBMSs.St d d i l d d i SQL 99 d t d t b Standards included in SQL-99 and expected to be enhanced in future SQL standards.
DATABASE SYSTEMS Lecture 1: Introduction to DBs 109
Database Languagesg g Data definition language (DDL)
P it ifi ti f d t t t t d d t Permits specification of data types, structures and any data constraints. All specifications are stored in the database.
Allows users to describe and name entitles attributes and Allows users to describe and name entitles, attributes and relationships required for the application.
Data manipulation language (DML)Data manipulation language (DML) General enquiry facility (query language) of the data. Provides basic data manipulation operations on data held in the p p
database. Procedural DML - allows user to tell system exactly how to
manipulate data. Non-Procedural DML - allows user to state what data is needed
rather than how it is to be retrieved
DATABASE SYSTEMS Lecture 1: Introduction to DBs 110
rather than how it is to be retrieved.
Database Languagesg g Fourth Generation Language (4GL)
Q L Query Languages Forms Generators Report Generators Report Generators Graphics Generators Application Generators Application Generators
There is no consensus about what constitutes a 4GL. Compared with a 3GL which is procedural a 4 GL is Compared with a 3GL, which is procedural, a 4 GL is
non-procedural. The user defines what is to be done not how The user defines what is to be done, not how.
DATABASE SYSTEMS Lecture 1: Introduction to DBs 111
DBMS Languages (DDL vs. DML)g g ( ) Data Definition Language (DDL): Used by the DBA and database designers to specify the
conceptual schema of a database. In many DBMSs, the DDL is also used to define
internal and external schemas (views).( ) In some DBMSs, separate storage definition language
(SDL) and view definition language (VDL) are used to(SDL) and view definition language (VDL) are used to define internal and external schemas. SDL is typically realized via DBMS commands provided to SDL is typically realized via DBMS commands provided to
the DBA and database designers
DATABASE SYSTEMS Lecture 1: Introduction to DBs 112
DBMS Languagesg g
Data Manipulation Language (DML): Used to specify database retrievals and updates
DML commands (data sublanguage) can be embedded DML commands (data sublanguage) can be embeddedin a general-purpose programming language (host l ) h COBOL C C++ Jlanguage), such as COBOL, C, C++, or Java. A library of functions can also be provided to access the
DBMS from a programming language
Alternatively, stand-alone DML commands can be applied directly (called a query language).
DATABASE SYSTEMS Lecture 1: Introduction to DBs 113
Types of DMLyp High Level or Non-procedural Language: For example, the SQL relational language Are “set”-oriented and specify what data to retrieve
rather than how to retrieve it. Also called declarative languages.
Low Level or Procedural Language: Retrieve data one record-at-a-time; Retrieve data one record at a time; Constructs such as looping are needed to retrieve
multiple records along with positioning pointersmultiple records, along with positioning pointers.
DATABASE SYSTEMS Lecture 1: Introduction to DBs 114
DBMS Interfaces Stand-alone query language interfaces Example: Entering SQL queries at the DBMS
interactive SQL interface (e.g. SQL*Plus in ORACLE) Programmer interfaces for embedding DML in
programming languagesp g g g g User-friendly interfaces Menu based forms based graphics based etc Menu-based, forms-based, graphics-based, etc.
DATABASE SYSTEMS Lecture 1: Introduction to DBs 115
Middleware Middleware is a generic term used to describe
ft th t di t ith th ft dsoftware that mediates with other software and allows for communication between disparate applications in a heterogeneous system.
The need for middleware arises when distributed systems become too complex todistributed systems become too complex to manage efficiently without a common interfaceinterface.
116
Cloud Computingp g The National Institute of Standards and
T h l (NIST) id d d fi itiTechnology (NIST) provided a definition. Defined as “A model for enabling ubiquitous,
convenient, on-demand network access to a shared pool of configurable computing p g p gresources (e.g. networks, servers, storage, applications, and services) that can be rapidlyapplications, and services) that can be rapidly provisioned and released with minimal management effort or service providermanagement effort or service provider interaction.”
117
Transaction Processing Monitorsg TP monitor is a program that controls data transfer between
clients and servers in order to provide a consistent environment, i l l f li i i (OLTP)particularly for online transaction processing (OLTP).
118
Web Services and Service-Oriented Architectures
Web service is a software system designed to t i t bl hi t b isupport interoperable machine-to-web service
machine interaction over a network. Web services share business logic, data, and
processes through a programmatic interface p g p gacross a network.
Developers can add the Web service to a Web Developers can add the Web service to a Web page (or an executable program) to offer specific f nctionalit to sersspecific functionality to users.
119
Web Services/Service-Oriented Architectures
Web services approach uses accepted t h l i d t d d htechnologies and standards, such as: XML (extensible Markup Language). SOAP (Simple Object Access Protocol) is a
communication protocol for exchanging structured information over the Internet and uses a message format based on XML. It is both platform- and l i d dlanguage-independent.
WSDL (Web Services Description Language) protocol, i b d XML i d d ib d lagain based on XML, is used to describe and locate a
Web service.
120
Web Services/Service-Oriented Architectures
UDDI (Universal Discovery, Description, and Integration) protocol is a platform independent XML-Integration) protocol is a platform independent, XMLbased registry for businesses to list themselves on the Internet.
121
Service-Oriented Architectures (SOA)( )
A business-centric software architecture for b ildi li ti th t i l t b ibuilding applications that implement business processes as sets of services published at a granularity relevant to the service consumer. Services can be invoked, published, and discovered, and are abstracted away from the implementation using a single standards-based p g gform of interface.
122
Distributed DBMSs A distributed database is a logically
i t l t d ll ti f h d d t ( dinterrelated collection of shared data (and a description of this data), physically distributed over a computer network.
A distributed DBMS is the software system that permits the management of thethat permits the management of the distributed database and makes the distrib tion transparent to sersdistribution transparent to users.
123
Distributed DBMSs A DDBMS consists of a single logical database
lit i t b f f tsplit into a number of fragments. Each fragment is stored on one or more computers
(replicas) under the control of a separate DBMS, with the computers connected by a network.
Each site is capable of independently processing user requests that require access to local data (that is, each site has some degree of local autonomy) and is also capable of processing data stored on other computers in the network.
124
Data Warehousingg A data warehouse was deemed the solution to meet the
requirements of a system capable of supporting decisionrequirements of a system capable of supporting decision making, receiving data from multiple operational data sources.
125
Cloud Computingp g The National Institute of Standards and
T h l (NIST) id d d fi itiTechnology (NIST) provided a definition. Defined as “A model for enabling ubiquitous,
convenient, on-demand network access to a shared pool of configurable computing p g p gresources (e.g. networks, servers, storage, applications, and services) that can be rapidlyapplications, and services) that can be rapidly provisioned and released with minimal management effort or service providermanagement effort or service provider interaction.”
126
Cloud Computing – Key Characteristics
On-demand self-service Consumers can obtain, configure and deploy cloud
services without help from provider.
Broad network access Accessible from anywhere, from any standardized
platform (e.g. desktop computers, laptops, mobile p ( g p p , p p ,devices).
127
Cloud Computing – Key Characteristics
Resource pooling Provider’s computing resources are pooled to serve
multiple consumers, with different physical and i t l d i ll i d dvirtual resources dynamically assigned and
reassigned according to consumer demand. Examples of resources include storage processingExamples of resources include storage, processing, memory, and network bandwidth.
128
Cloud Computing – Key Characteristics
Rapid elasticity Provider’s capacity caters for customer’s spikes in
demand and reduces risk of outages and service i t ti C it b t t d t linterruptions. Capacity can be automated to scale rapidly based on demand.
Measured service Provider uses a metering capability to measure
usage of service (e.g. storage, processing, bandwidth, and active user accounts).
129
Cloud Computing – Service Modelsp g Software as a Service (SaaS): Software and data hosted on cloud. Accessed
through using thin client interface (e.g. web b ) C b ff d li it dbrowser). Consumer may be offered limited user specific application configuration settings. E l i l d S l f l t Examples include Salesforce.com sales management applications, NetSuite’s integrated business management software Google’s Gmail andmanagement software, Google’s Gmail and Cornerstone OnDemand.
130
Cloud Computing – Service Modelsp g Platform as a Service (PaaS) Allows creation of web applications without
buying/maintaining the software and underlying i f t t P id thinfrastructure. Provider manages the infrastructure including network, servers, OS and storage while customer controls deployment ofstorage, while customer controls deployment of applications and possibly configuration.
Examples include Salesforce com’s Force com Examples include Salesforce.com’s Force.com, Google’s App Engine, and Microsoft’s Azure.
131
Cloud Computing – Service Modelsp g Infrastructure as a Service (IaaS) Provider’s offer servers, storage, network and
operating systems – typically a platform i t li ti i t tvirtualization environment – to consumers as an on-
demand service, in a single bundle and billed according to usageaccording to usage.
A popular use of IaaS is in hosting websites. Examples Amazon’s Elastic Compute Cloud (EC2)Examples Amazon’s Elastic Compute Cloud (EC2), Rackspace and GoGrid.
132
Cloud Computing – Comparison of Services M d lModels
133
Benefits of Cloud Computing p g Cost-Reduction: Avoid up-front capital expenditure.
Scalability/Agility: Organisations set up resources on an as Scalability/Agility: Organisations set up resources on an as-needs basis.
Improved Security: Providers can devote expertise & Improved Security: Providers can devote expertise & resources to security; not affordable by customer.
Improved Reliability: Providers can devote expertise & Improved Reliability: Providers can devote expertise & resources on reliability of systems; not affordable by customer.
Access to new technologies: Through use of provider’s systems, customers may access latest technology.
134
Benefits of Cloud Computing p g Faster development: Provider’s platforms can
id f th i t l tprovide many of the core services to accelerate development cycle.
Large scale prototyping/load testing: Providers have the resources to enable this.
More flexible working practices: Staff can access files using mobile devices.
Increased competitiveness: Allows organizations to focus on their core competencies rather than their pIT infrastructures.
135
Risks of Cloud Computing p g Network Dependency: Power outages, bandwidth issues and
service interruptionsservice interruptions. System Dependency: Customer’s dependency on
availability and reliability of provider’s systems.availability and reliability of provider s systems. Cloud Provider Dependency: Provider could became
insolvent or acquired by competitor, resulting in the q y p , gservice suddenly terminating.
Lack of control: Customers unable to deploy technical or organisational measures to safeguard the data. May result in reduced availability, integrity, confidentiality, inter enabilit and isolationintervenability and isolation.
Lack of information on processing transparency
136
Cloud-based database solutions As a type of Software as a Service (SaaS),
l d b d d t b l ti f ll i t tcloud-based database solutions fall into two basic categories: Data as a Service (DaaS) and Database as a Service (DBaaS).
Key difference between the two options is• Key difference between the two options is mainly how the data is managed.
137
Cloud-based database solutions DBaaS Offers full database functionality to application
developers. Provides a management layer that provides
continuous monitoring and configuring of the d t b t ti i d li hi h il bilitdatabase to optimized scaling, high availability, multi-tenancy (that is, serving multiple client organizations) and effective resource allocation inorganizations), and effective resource allocation in the cloud, thereby sparing the developer from ongoing database administration tasksongoing database administration tasks.
138
Cloud-based database solutions DaaS: Services enables data definition in the cloud and
subsequently querying. Does not implement typical DBMS interfaces (e.g.
SQL) but instead data is accessed via common APIs. Enables organization with valuable data to offer
access to others. Examples Urban Mapping ( h d i ) Xi i (fi i l d(geography data service), Xignite (financial data service) and Hoovers (business data service.)
139
Cloud-based database solutions Multi-tenant cloud database-shared server,
t d t b hit tseparate database server process architecture.
140
Cloud-based database solutions Multi-tenant cloud database-shared DBMS
t d t bserver, separate databases.
141
Cloud-based database solutions Multi-tenant cloud database-shared DBMS
t d t bserver, separate databases.
142
Cloud-based database solutions Multi-tenant cloud database–shared database,
separate schema architectureseparate schema architecture.
143
Components of a DBMSp A DBMS is partitioned into several software
t ( d l ) h f hi h icomponents (or modules), each of which is assigned a specific operation. As stated previously, some of the functions of the DBMS are supported by the underlying operating system.
The DBMS interfaces with other software The DBMS interfaces with other software components, such as user queries and access methods (file management techniques formethods (file management techniques for storing and retrieving data records).
144
Components of a DBMSp
145
Components of a DBMS (Continued)p ( ) Query processor is a major DBMS component
that transforms queries into a series of lowthat transforms queries into a series of low-level instructions directed to the database manager.
Database manager (DM) interfaces with user-submitted application programs and queries. The DM examines the external and conceptual pschemas to determine what conceptual records are required to satisfy the request. The DMare required to satisfy the request. The DM then places a call to the file manager to perform the requestperform the request.
146
Components of a DBMS (Continued)p ( ) File manager manipulates the underlying
storage files and manages the allocation ofstorage files and manages the allocation of storage space on disk. It establishes and
i t i th li t f t t d i dmaintains the list of structures and indexes defined in the internal schema.
DML preprocessor converts DML statements embedded in an application program into pp p gstandard function calls in the host language. The DML preprocessor must interact with theThe DML preprocessor must interact with the query processor to generate the appropriate codecode.
147
Components of a DBMS (Continued)p ( ) DDL compiler converts DDL statements into a
t f t bl t i i t d t Th t blset of tables containing metadata. These tables are then stored in the system catalog while control information is stored in data file headers.
Catalog manager manages access to and maintains the system catalog. The systemmaintains the system catalog. The system catalog is accessed by most DBMS components.
148
Components of DB Manager (DM)p g ( )
149
Components of the DB Managerp g Authorization control to confirm whether the
h th i i t tuser has the necessary permission to carry out the required operation.
Command processor on confirmation of user authority, control is passed to the command y, pprocessor.
Integrity checker ensures that requested Integrity checker ensures that requested operation satisfies all necessary integrity constraints (e g ke constraints) for anconstraints (e.g. key constraints) for an operation that changes the database.
150
Components of the DB Managerp g Query optimizer determines an optimal strategy
f th tifor the query execution. Transaction manager performs the required
processing of operations that it receives from transactions.
Scheduler ensures that concurrent operations on the database proceed without conflictingon the database proceed without conflicting with one another. It controls the relative order in hich transaction operations are e ec tedin which transaction operations are executed.
151
Components of the DB Manager
Recovery manager ensures that the database i i i t t t t i th fremains in a consistent state in the presence of
failures. It is responsible for transaction commit and abort.
Buffer manager responsible for the transfer of ff g pdata between main memory and secondary storage, such as disk and tape.storage, such as disk and tape.
The recovery manager and the buffer manager also kno n as (aka) the d t Thealso known as (aka) the data manager. The buffer manager aka the cache manager.
152