132B-intro1 - University of California, San Diego

Download Report

Transcript 132B-intro1 - University of California, San Diego

Spring 2000
FROM RELATIONAL TO OBJECT
DATABASE MANAGEMENT
SYSTEMS
V. CHRISTOPHIDES
Department of Computer Science & Engineering
University of California, San Diego
ICS - FORTH, Heraklion, Crete
Christophides Vassilis
1
Spring 2000
I) INTRODUCTION
Christophides Vassilis
2
Spring 2000
What is a DBMS?

Database: Logically coherent collection of “computerized” data
Stored
Data: Persistent facts with some inherent meaning
Accessible Data: Extracted and derived facts for a specific purpose

Database Management System: General purpose software that
facilitates the process of defining, constructing and manipulating
database for various applications. It offers the following services:
Data
Persistence
Disk Management
Data Sharing
Data Reliability
Ad hoc Queries
Christophides Vassilis
3
Spring 2000
DBMS Applications

Administration & Management  Media & Net-centric Applications
Bank Accounts
Engineering (CAD/CAM/CIM/CAE)
Company Stocks & Personal
Scientific Applications
 Genome Databases, Environmental
Airline Reservation
Applications (GIS)
University Courses and
Telecommunications + Databases
Notes
 Network management, TeleLibrary Books Borrowing
medicine, Info Brokering
Multimedia,
Entertain., Visualization
 Interactive, Virtual Reality based
Software
Design and Management
Data Warehouses
Web Site Management
Electronic Commerce
Christophides Vassilis
4
Spring 2000
DBMS vs. other types of software


Effective Manipulation of Persistent Data
recovery from failures
concurrent access
security & integrity controls
data independence physical & logical & user
Efficient Access to Large Data Volumes
buffer management
indexing/clustering
query optimization
distribution
Christophides Vassilis
5
Spring 2000
Example: Phone Directory

One file:
 first and last name, address, profession, telephone number

Two type of access:
 Direct by first/last name (white pages)
 Sequential by profession headings (yellow pages)

Implementation without a DBMS:
 Hashing on first/last name (key) and linked lists of profession headings
 Change of the access mode implies PROGRAM RERWITING

Implementation with a DBMS:
 Choice of a physical structure
 Choice of a logical structure
 Application programs are build on the top of data logical structuring
Christophides Vassilis
6
Spring 2000
The ANSI-SPARC Architecture



External Level:
What actually seen by users (not necessary the whole database)
Conceptual Level:
Modeling of the real-word data, independent from the underlying
DBMS
Internal Level: How data is physically stored
Logical-schema: Logical organization of data using the DBMS
data model (tables, etc.)
Physical-schema: Physical organization of data in the secondary
memory (files, records, etc.)
 The ability to modify a scheme definition in one level without affecting
a scheme definition in a higher level is called data independence
Christophides Vassilis
7
Spring 2000
Three Level Architecture
EXTERNAL
LEVEL
VIEW 1
VIEW 2
VIEW 3
INTEGRATION
CONCEPTUAL
LEVEL
LOGICAL
SCHEMA
PHYSICAL
SCHEMA
Christophides Vassilis
INTERNAL
LEVEL
8
Spring 2000
The Data Independence issue

Physical (for optimization)
 Changes of physical structures doesn’t affect data logical organization
 EXAMPLE: Addition/Suppression of indices in a DBMS

Logical (for maintainability)
 Modifications of data logical structure should not affect programs
 EXAMPLE: New Relations/Attributes in the logical schema of a DBMS

User (for flexibility)
 Multiple views on the same logical organization of data
 EXAMPLE: Secretary and Professor views on a University database
 Data independence is achieved by inter-level mappings
 Queries are translated between levels automatically
Christophides Vassilis
9
Spring 2000
Mappings in DBMS
User A
User B
Host Language + DSL
External
Schema A
Schemas and
mapping built
and maintained
by the database
administrator
(DBA)
Host Language + DSL
External View A
Conceptual/
External
Mapping A
Conceptual
Schema
Database
Management
Systems (DBMS)
Conceptual View
Conceptual/
Internal
Mapping
Stored database (internal View)
Strorage structure
definition
(Internal Schema)
USER INTERFACE
Christophides Vassilis
10
Spring 2000
DBMS Components

Data Collections:
 Minimizing data redundancy
 Enabling multi-user access

People:
 Database Designer
 Database Administrator
 Application Programmers
 End-Users

Hardware:
 Processor(s)
 Main Memory
 Secondary Storage (e.g.,
disks, CD-ROMs, etc.)
Christophides Vassilis

Software
 The Storage Manager:
buffer and file manager
 The Transaction Manager:
locking, logging, and
transaction commitment
(ACID)
 The Query Processor:
parsing, optimization,
execution
 Various Automated Tools:
Development and Design
aids, Report writers, etc.
11
Spring 2000
Typical Architecture of a DBMS
Schema
Modifications
Queries
Data
Modifications
“Query” Processor
Transaction Manager
Storage Manager
Data & Metadata
Christophides Vassilis
12
Spring 2000
Application Development: Backend vs. Frontend



Backend  the DBMS
Frontends  Applications which
run on top of the DBMS
Examples of vendor-provided
applications or tools









Query language processor
Business graphics sub-systems
Spreadsheet
Statistical packages
Application generators
CASE Tools
Report writer
Web-DBMS Gateways
End User
A pplications
Frontend
Programming
Interf ace
Backend
DBMS
Examples of typical utilities to help
DBAs in various tasks





Load routines
Unload/Reload routines
Reorganization routines
Statistic routines
Analysis routines
Christophides Vassilis
Database
13
Spring 2000
Application Development: Client/Server Architecture


Partition of programs between
client et server processes,
communicating via queries
Hierarchical partition of functions
data at the servers are shared
by several clients
graphical interfaces at the enduser workstations
communication through
standardized protocols
distribution of application
programs in order to minimize
transfer costs
Christophides Vassilis
End User
A pplications
Frontend
Tr a nspa r ent r emote
a ccess
Backend
DBMS
Database
14
Spring 2000
Client/Server Architecture: First Generation
DBMS
SERVER
rules
NT, UNIX, NOVELL
Data
GCOS, VMS, MVS
Queries
Windows
APPLICATION
Results
NT
APPLICATIONS
UNIX
CLIENTS
APPLICATIONS
 G. Gardarin
Christophides Vassilis
15
Spring 2000
Client/Server Architecture: Second Generation



Stored Procedures
Procedure accomplice a
service function on data
Service-oriented architecture
rather than query-oriented
Distribution of data
manipulation
Extensibility and Scalability
Possibility to have several,
eventually redundant, servers
Possibility to have private
data on clients
CLIENTS
Application
Application
Application Tool
Application Tool
Connectivity Tool
Connectivity Tool
Network Protocol
Network Protocol
Service Requests
Service Requests
Results
Network Protocol
Connectivity Tool
DB Server
Stored
Procedures
 G. Gardarin
SERVER
Database
Christophides Vassilis
16
Spring 2000
Client/Server Architecture: Third Generation

Integration of the Web with the
client-server
Use

Three(or Multi)-tiered Architectures
Databases
with stored procedures
Shared application services

URL
Cartridges
HTTP
Server
Files
or CGI
media types which can be
extended (text, image, video)
Navigation between documents
and applications
Christophides Vassilis
WRB
WRB
WRB
WRB
WRB
PL/SQL
C
Java
Perl
JCORBA
Web Request Broker
Hypermedia support
Various
HTML
Web Request Broker
Web browsers for a standard
presentation to the client
Possibility to run small client
application (applets)
Significant portability (Virtual
Private Network, Intranet, Internet)
Browser
 ORACLE
Oracle
Database
17
Spring 2000
Database Technology Timeline
Simple Data
Management
Global Enterprise
Management
Early 80s
Late 80s
Early
Relational
Prerelational
Simple
OLTP
Simple
transactions,
on-line
backup &
recovery
Christophides Vassilis
Early - Mid 90s
Client-server
Relational
Active
Database
Stored
procedures,
triggers
Enterprise
-capable
Relational
Data
Warehouse &
Hi-end OLTP
Scaleable OLTP,
parallel query,
partitioning,
cluster support,
row-level locking,
high availability
Late 90s - 21st C
Internet
Computing
Packaged &
Vertical
Applications
Support for
all types of
data,
extensibility,
objects
Middleware
(messaging,
queues,events)
Java, CORBA,
Web interfaces
18