Вы находитесь на странице: 1из 43

Chapter2&3

DatabaseEnvironment&Architectures

Chapter2Objectives

Purposeofthreeleveldatabasearchitecture.

Contentsofexternal,conceptual,andinternallevels.

Purposeofexternal/conceptualand
conceptual/internalmappings.

Meaningoflogicalandphysicaldataindependence.

DistinctionbetweenDDLandDML.

Aclassificationofdatamodels.
2

Chapter2Objectives

Purpose/importanceofconceptualmodeling.
TypicalfunctionsandservicesofaDBMS.
Functionandimportanceofsystemcatalog.
SoftwarecomponentsofaDBMS.
Meaningofclientserverarchitectureand
advantagesofthistypeofarchitecturefora
DBMS.
FunctionsandusesofTransactionProcessing
Monitors.
3

ANSISPARC
Architecture

ThreeLevel

ANSI-American National Standard Institute


SPARC- Standard Planning and Requirement Committee

ANSISPARCThreeLevel
Architecture(StandardPlanning)

ExternalLevel
Usersviewofthedatabase.
Describesthatpartofdatabasethatisrelevanttoaparticular
user.

ConceptualLevel(objectsdefinedincurrentDB)
Communityviewofthedatabase.
Describeswhatdataisstoredindatabaseandrelationships
amongthedata.

InternalLevel
Physicalrepresentationofthedbonthecomputer.
Describeshowthedataisstoredinthedatabase.
(Sizesofobjects&Locationofstoragedisksorarrays)

ObjectivesofThreeLevel
Architecture(ToEndUser)

Allusersshouldbeabletoaccesssamedata.

Ausersviewisimmunetochangesmadein
otherviews.

Usersshouldnotneedtoknowphysical
databasestoragedetails.

ObjectivesofThreeLevel
Architecture(ToDBA)

DBAshouldbeabletochangedatabasestorage
structureswithoutaffectingtheusersviews.

Internalstructureofdatabaseshouldbe
unaffectedbychangestophysicalaspectsof
storage.

DBAshouldbeabletochangeconceptual
structureofdatabasewithoutaffectingallusers.

DB Schema The overall


Description of DB

Highest Level- external schema


(Users

views & Subschema)

Middle Level Conceptual Schema


(

entities, attributes, relationships,


integrity constraints)

Lowest level internal schema


(complete

description containing
objects definitions, methods of
representation - tables, indexes,
storage structures)
8

DifferencesamongThreeLevelsof
ANSISPARCArchitecture

DataIndependence

LogicalDataIndependence
Referstoimmunityofexternalschemasto

changesinconceptualschema.
Conceptualschemachanges(e.g.
addition/removalofentities).
Shouldnotrequirechangestoexternalschemaor
rewritesofapplicationprograms.

10

DataIndependence

PhysicalDataIndependence
Referstoimmunityofconceptualschemato

changesintheinternalschema.
Internalschemachanges(e.g.usingdifferentfile
organizations,storagestructures/devices).
Shouldnotrequirechangetoconceptualor
externalschemas.

11

DataIndependenceandtheANSI
SPARCThreeLevelArchitecture

12

DatabaseLanguagesdatasublanguage
ManyDBMSshaveafacilityforembeddingdb
LanguagetohighlevellanguagesuchasC,C++,
Visualbasic,JAVA,andetc..

DataDefinitionLanguage(DDL)
AllowstheDBAorusertodescribe,define
andnameentities,attributes,and
relationshipsrequiredfortheapplication
plusanyassociatedintegrityandsecurity
constraintswithdbobjects.
13

DatabaseLanguages

DataManipulationLanguage(DML)
Providesbasicdatamanipulationoperationsondata

heldinthedatabase.

ProceduralDML
allowsusertotellsystemexactlyhowtomanipulate

data.

NonProceduralDML
allowsusertostatewhatdataisneededratherthanhow

itistoberetrieved.Ex.SQLorQBE.

FourthGenerationLanguages(4GLs)
Ex.SQLorQBE,Formgeneratorand
generator.

Report
14

DataModelTorepresentdatain
anunderstandableway

Integratedcollectionofconceptsfor
describingdata(Entities),relationships
betweendata(entities),andconstraintson
thedata(attributes)inanorganization.
DataModelcomprises:
astructuralpart;
amanipulativepart;
possiblyasetofintegrityrules.

15

Data Model
InANSISPARCarchitecture(fitted):
1. Externaldatamodel(User
views)
2. Conceptualdatamodel
3. Internaldatamodel
Diagramsofabovemodelsshow
difference.
16

DataModels

ObjectBasedDataModels

RecordBasedDataModels

EntityRelationship(inCh12&13)
Semantic
Functional(inch27.5.2)
ObjectOriented.(inCh2729)

RelationalDataModel
NetworkDataModel
HierarchicalDataModel.

PhysicalDataModels
Recordstructures,recordorderings,accesspaths

17

RelationalDataModel
(Logicalstucturesofdata)
Key No. to link two tables
at the record level.

18

NetworkDataModel

Records ( nodes) link (pointers) to sets (edges).


19

HierarchicalDataModel

one of network data modesl with restriction of


only one parent node.

20

ConceptualModeling

Conceptualschemaisthecoreofasystem
supportingalluserviews.
Shouldbecompleteandaccurate
representationofanorganizationsdata
requirements.(notenoughforprocedures)
Conceptualmodelingisprocessofdevelopinga
modelofinformationusethatisindependentof
implementationdetails.
21

FunctionsofaDBMS

DataStorage,Retrieval,andUpdate.
AUserAccessibleCatalog.(Systemcatalogofmetadata)
TransactionSupport.(Userrequirements)
ConcurrencyControlServices.
RecoveryServices.
AuthorizationServices.
SupportforDataCommunication.(interfacewithothers)
IntegrityServices.
ServicestoPromoteDataIndependence.
UtilityServices.(import/export,monitoring,recovery
statisticalanalysis,indexreorg)
22

Chapter3DatabaseArchitectures

MultiUserDBMSinThreedifferent
Teleprocessing
Architectures
Fileserver

Clientserver

23

Teleprocessing

Traditionalarchitecture.
Singlemainframewithanumberof
terminalsattached.

24

FileServer

Fileserverisconnectedtoseveralworkstations
acrossanetwork.

Databaseresidesonfileserver.

DBMSandapplicationsrunoneachworkstation.

Disadvantagesinclude:

Significantnetworktraffic.
CopyofDBMSoneachworkstation.
Concurrency,recoveryandintegritycontrolmorecomplex.
25

FileServerArchitecture

26

TraditionalTwoTierClientServer

Client(tier1)managesuserinterfaceand
runsapplications.
Server(tier2)holdsdatabaseandDBMS.
Advantagesinclude:

wideraccesstoexistingdatabases;
increasedperformance;
possiblereductioninhardwarecosts;
reductionincommunicationcosts;
increasedconsistency.

27

TraditionalTwoTierClientServer

28

TraditionalTwoTierClientServer

29

Summary of clientserver
functions

ThreeTierClientServer

Client side presented two problems


preventing true scalability:

A fat client requires considerable resources


on clients computer to run effectively.
Significant client side has administration
overhead.

By 1995, three layers proposed,


each potentially running on a
different platform. The application
server is introduced to hold
business logic and procedures.
31

ThreeTierClientServer
Advantages:

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 easier to
implement load balancing.
Maps
quite
naturally
to
Web
environment.
Thin

32

ThreeTierClientServer

Notes: Expanding to N-Tier Architectures involving RPC middlewares.


33

TransactionProcessingMonitors

Programthatcontrolsdatatransfer
betweenclientsandserversinorderto
provideaconsistentenvironment,
particularlyforOnlineTransaction
Processing(OLTP).

34

TPMasmiddletierof3tierclient
server

35

Distributed DBMSs

Distributed database

Logically interrelated collection of shared


data physically distributed over a
computer network

Distributed DBMS
Software system that permits the
management of the distributed database
Makes the distribution transparent to
users

Distributed DBMSs

Characteristics of DDBMS
Collection

of logically related shared data


Data split into fragments
Fragments may be replicated
Fragments/replicas are allocated to sites
Sites are linked by a communications
network
Data at each site is controlled by DBMS
DMBS handles local apps autonomously
Each DBMS in one or more global app

Distributed DBMSs

Distributed processing
Centralized

database that can be


accessed over a computer network

System consists of data that is


physically distributed across a
number of sites in the network

Data Warehousing

Data warehouse
Consolidated/integrated

view of corporate

data
Drawn from disparate operational data
sources
Range of end-user access tools capable of
supporting simple to highly complex
queries to support decision making
Subject-oriented, integrated, timevariant, and nonvolatile

Typical Architecture of a Data


Warehouse

SystemCatalog
(PartsofDataDictionary)

Repositoryofinformation(metadata)
describingthedatainthedatabase.
Oneofthefundamentalcomponentsof
DBMS.
Typicallystores:

names,types,andsizesofdataitems;
constraintsonthedata;
namesofauthorizedusers;
dataitemsaccessiblebyauserandthetypeofaccess;
usagestatistics.
41

ComponentsofaDBMS

42

Components of Database Manager


(DM)

43

Вам также может понравиться