Chapter2
DatabaseEnvironment
Pearson Education 2015
Chapter2Objectives
Purposeofthreeleveldatabasearchitecture.
Contentsofexternal,conceptual,andinternallevels.
Purposeofexternal/conceptualand
conceptual/internalmappings.
Meaningoflogicalandphysicaldataindependence.
DistinctionbetweenDDLandDML.
Aclassificationofdatamodels.
Pearson Education 2015
Chapter2Objectives
Purpose/importanceofconceptualmodeling.
TypicalfunctionsandservicesaDBMS
shouldprovide.
Functionandimportanceofsystemcatalog.
SoftwarecomponentsofaDBMS.
Meaningofclientserverarchitectureand
advantagesofthistypeofarchitecturefora
DBMS.
FunctionandusesofTransactionProcessing
Monitors.
Pearson Education 2015
ObjectivesofThreeLevel
Architecture
Allusersshouldbeabletoaccesssame
data.
Ausersviewisimmunetochangesmade
inotherviews.
Usersshouldnotneedtoknowphysical
databasestoragedetails.
Pearson Education 2015
ObjectivesofThreeLevel
Architecture
DBAshouldbeabletochangedatabase
storagestructureswithoutaffectingthe
usersviews.
Internalstructureofdatabaseshouldbe
unaffectedbychangestophysicalaspects
ofstorage.
DBAshouldbeabletochangeconceptual
structureofdatabasewithoutaffectingall
users.
Pearson Education 2015
ANSISPARCThreeLevel
Architecture
Pearson Education 2015
ANSISPARCThreeLevel
Architecture
ExternalLevel
Usersviewofthedatabase.
Describesthatpartofdatabasethatis
relevanttoaparticularuser.
ConceptualLevel
Communityviewofthedatabase.
Describeswhatdataisstoredindatabase
andrelationshipsamongthedata.
Pearson Education 2015
ANSISPARCThreeLevel
Architecture
InternalLevel
Physicalrepresentationofthedatabaseon
thecomputer.
Describeshowthedataisstoredinthe
database.
Pearson Education 2015
DifferencesbetweenThree
LevelsofANSISPARC
Architecture
Pearson Education 2015
DataIndependence
LogicalDataIndependence
Referstoimmunityofexternalschemasto
changesinconceptualschema.
Conceptualschemachanges(e.g.
addition/removalofentities).
Shouldnotrequirechangestoexternal
schemaorrewritesofapplicationprograms.
Pearson Education 2015
10
DataIndependence
PhysicalDataIndependence
Referstoimmunityofconceptualschemato
changesintheinternalschema.
Internalschemachanges([Link]
fileorganizations,storagestructures/devices).
Shouldnotrequirechangetoconceptualor
externalschemas.
Pearson Education 2015
11
DataIndependenceandthe
ANSISPARCThreeLevel
Architecture
Pearson Education 2015
12
DatabaseLanguages
DataDefinitionLanguage(DDL)
AllowstheDBAorusertodescribeand
nameentities,attributes,andrelationships
requiredfortheapplication
plusanyassociatedintegrityandsecurity
constraints.
Pearson Education 2015
13
DatabaseLanguages
DataManipulationLanguage(DML)
Providesbasicdatamanipulationoperations
ondataheldinthedatabase.
ProceduralDML
allowsusertotellsystemexactlyhowto
manipulatedata.
NonProceduralDML
allowsusertostatewhatdataisneeded
ratherthanhowitistoberetrieved.
FourthGenerationLanguages(4GLs)
Pearson Education 2015
14
DataModel
Integratedcollectionofconceptsfor
describingdata,relationshipsbetween
data,andconstraintsonthedatainan
organization.
DataModelcomprises:
astructuralpart;
amanipulativepart;
possiblyasetofintegrityrules.
Pearson Education 2015
15
DataModel
Purpose
Torepresentdatainanunderstandableway.
Categoriesofdatamodelsinclude:
Objectbased
Recordbased
Physical.
Pearson Education 2015
16
DataModels
ObjectBasedDataModels
EntityRelationship
Semantic
Functional
ObjectOriented.
RecordBasedDataModels
RelationalDataModel
NetworkDataModel
HierarchicalDataModel.
PhysicalDataModels
Pearson Education 2015
17
RelationalDataModel
Pearson Education 2015
18
NetworkDataModel
Pearson Education 2015
19
HierarchicalDataModel
Pearson Education 2015
20
ConceptualModeling
Conceptualschemaisthecoreofasystem
supportingalluserviews.
Shouldbecompleteandaccurate
representationofanorganizationsdata
requirements.
Conceptualmodelingisprocessof
developingamodelofinformationusethat
isindependentofimplementationdetails.
Resultisaconceptualdatamodel.
Pearson Education 2015
21
FunctionsofaDBMS
DataStorage,Retrieval,andUpdate.
AUserAccessibleCatalog.
TransactionSupport.
ConcurrencyControlServices.
RecoveryServices.
Pearson Education 2015
22
FunctionsofaDBMS
AuthorizationServices.
SupportforDataCommunication.
IntegrityServices.
ServicestoPromoteDataIndependence.
UtilityServices.
Pearson Education 2015
23
SystemCatalog
Repositoryofinformation(metadata)
describingthedatainthedatabase.
Oneofthefundamentalcomponentsof
DBMS.
Typicallystores:
names,types,andsizesofdataitems;
constraintsonthedata;
namesofauthorizedusers;
dataitemsaccessiblebyauserandthetypeof
access;
usagestatistics.
Pearson Education 2015
24
ComponentsofaDBMS
Pearson Education 2015
25
ComponentsofDatabase
Manager
Pearson Education 2015
26
MultiUser
Architectures
DBMS
Teleprocessing
Fileserver
Clientserver
Pearson Education 2015
27
Teleprocessing
Traditionalarchitecture.
Singlemainframewithanumberof
terminalsattached.
Trendisnowtowardsdownsizing.
Pearson Education 2015
28
FileServer
Fileserverisconnectedtoseveral
workstationsacrossanetwork.
Databaseresidesonfileserver.
DBMSandapplicationsrunoneach
workstation.
Disadvantagesinclude:
Significantnetworktraffic.
CopyofDBMSoneachworkstation.
Concurrency,recoveryandintegritycontrolmore
Pearson Education 2015
complex.
29
FileServerArchitecture
Pearson Education 2015
30
TraditionalTwoTierClientServer
Client(tier1)managesuserinterfaceand
runsapplications.
Server(tier2)holdsdatabaseandDBMS.
Advantagesinclude:
wideraccesstoexistingdatabases;
increasedperformance;
possiblereductioninhardwarecosts;
reductionincommunicationcosts;
increasedconsistency.
Pearson Education 2015
31
TraditionalTwoTierClient
Server
Pearson Education 2015
32
Traditional TwoTier Client
Server
Pearson Education 2015
33
ThreeTierClientServer
Client
side
presented
problems
preventing
scalability:
two
true
Fat client, requiring considerable
resources on clients computer to run
effectively.
Significant client side administration
overhead.
By 1995, three layers proposed,
each potentially running on a
different platform.
Pearson Education 2015
34
ThreeTierClientServer
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 easier to
implement load balancing.
Maps
quite
naturally
to
Web
environment.
Pearson Education 2015
35
ThreeTierClientServer
Pearson Education 2015
36
TransactionProcessing
Monitors
Programthatcontrolsdatatransfer
betweenclientsandserversinorderto
provideaconsistentenvironment,
particularlyforOnlineTransaction
Processing(OLTP).
Pearson Education 2015
37
TPMasmiddletierof3tierclient
server
Pearson Education 2015
38