1.2 architecture - Google Docs
1.2 architecture - Google Docs
NavatheSlide 2- 1
Module 1.2
atabase System Concepts and
D
Architecture
■Three-Schema Architecture
■Data Independence
■
Includes descriptions of the database structure,
data types, and the constraints on the database.■
Schema Diagram:
Anillustrativedisplay of (most aspects of) a
■
database schema.
Schema Construct:
■
in time.
■ Initial Database State:
Refers to the database state when it is initially
■
atabase Schema
D
vs. Database State (continued)
■ Distinction
■ hedatabase schemachanges very infrequently.
T
■
Thedatabase statechanges every time the
database is updated.
Three-Schema Architecture
■ Proposed to support DBMS characteristics of:
■ rogram-data independence.
P
■
Support ofmultiple viewsof the data.
Not explicitly used in commercial DBMS products,
■
but has been useful in explaining database
system organization
Three-Schema Architecture
■ Defines DBMS schemas atthreelevels:
Internal schemaat the internal level to describephysical
■
Three-Schema Architecture
■ Mappings among schema levels are needed to
transform requests and data.
■Programs refer to an external schema, and are
mapped by the DBMS to the internal schema for
execution.
■Data extracted from the internal DBMS level is
reformatted to match the user’s external view (e.g.
formatting the results of an SQL query for display
in a Web page)
Data Independence
■ Logical Data Independence:
he capacity to change the conceptual schema
T
■
DBMS Languages
■ ata Definition Language (DDL)
D
■Data Manipulation Language (DML)
language
DBMS Languages
■ Data Definition Language (DDL): ■Used by the
BA and database designers to specify the
D
conceptual schema of a database.■In many
DBMSs, the DDL is also used to define internal
and external schemas (views).
■
In some DBMSs, separatestorage definition
language (SDL)andview definition language
(VDL)are used to define internal and external
schemas.
DL is typically realized via DBMS commands
S
■
DBMS Languages
■ Data Manipulation Language (DML):■Used to
s pecify database retrievals and updates■DML
commands (data sublanguage) can be
embeddedin a general-purpose programming
language (host language), such as COBOL, C,
C++, or Java.
library of functions can also be provided to access
A
■
Types of DML
■ High Level or Non-procedural Language:■For
xample, the SQL relational language■Are
e
“set”-oriented and specify what data to retrieve
rather than how to retrieve it.
■
Also calleddeclarativelanguages.
■ Low Level or Procedural Language:
etrieve data one record-at-a-time;
R
■
■
Constructs such as looping are needed to retrieve
multiple records, along with positioning pointers.
DBMS Interfaces
■ Stand-alone query language interfaces■
xample: Entering SQL queries at the DBMS
E
interactive SQL interface (e.g. SQL*Plus in
ORACLE)
■Programmer interfaces for embedding DML in
programming languages
■User-friendly interfaces
Other Tools
■ Data dictionary / repository:
■ Used to store schema descriptions and other
information such as design decisions, application
program descriptions, user information, usage
standards, etc.
■ Active data dictionaryis accessed by DBMS
software and users/DBA.
■Passive data dictionaryis accessed by
users/DBA only.
Other Tools
■ Application Development Environments and
CASE (computer-aided software engineering)
tools:
■Examples:
entralized and
C
Client-Server DBMS Architectures
■ Centralized DBMS:
■ ombines everything into singlesystemincluding
C
DBMSsoftware,hardware,applicationprograms,
and user interface processing software.
■
User can still connect through a remote terminal–
however, all processing is done at centralized
site.
Copyright © 2007 Ramez Elmasri and Shamkant B. NavatheSlide 2- 31
Clients
■ Provide appropriate interfaces through a client
software module to access and utilize the various
s erver resources.
■Clients may be diskless machines or PCs or
Workstations with disks with only the client
software installed.
■Connected to the servers via some form of a
network.
(LAN: local area network, wireless network, etc.)
■
DBMS Server
■ Provides database query and transaction servicesto the
clients
■Relational DBMS servers are often called SQL servers,
uery servers, or transaction servers
q
■Applications running on clients utilize an Application
Server:
Stores the web connectivity software and the businesslogic
■
Classification of DBMSs
■ Based on the data model used
Traditional: Relational, Network, Hierarchical.
■
Emerging: Object-oriented, Object-relational.■
■
Other classifications
■Single-user (typically used with personal
computers)
vs. multi-user (most DBMSs).
■Centralized (uses a single computer with one
database)
vs. distributed (uses multiple computers, multiple
databases)
■Object-Relational Models
Network Model
■ Advantages:
Network Model is able to model complex
■
database.
Network Model
■ Disadvantages:
■ avigational and procedural nature of processing
N
■
Database contains a complex array of pointers
that thread through a set of records.
Little scope for automated “query optimization”
■
Hierarchical Model
■ Advantages:
■ imple to construct and operate
S
■Corresponds to a number of natural hierarchicallyorganized
domains, e.g., organization (“org”) chart
■
Language is simple:
Uses constructs like GET, GET UNIQUE, GET NEXT,GET
■
Summary
■ ata Models and Their Categories
D
■History of Data Models
■Three-Schema Architecture
■Data Independence