DatabaseEnvironment
Chapter2Objectives
Purposeofthreeleveldatabasearchitecture.
Contentsofexternal,conceptual,andinternallevels.
Purposeofexternal/conceptualand
conceptual/internalmappings.
Meaningoflogicalandphysicaldataindependence.
DistinctionbetweenDDLandDML.
Aclassificationofdatamodels.
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
ANSISPARCThreeLevel
Architecture
ExternalLevel
Usersviewofthedatabase.
Describesthatpartofdatabasethatis
relevanttoaparticularuser.
ConceptualLevel
Communityviewofthedatabase.
Describeswhatdataisstoredindatabase
andrelationshipsamongthedata.
ANSISPARCThreeLevel
Architecture
InternalLevel
Physicalrepresentationofthedatabaseon
thecomputer.
Describeshowthedataisstoredinthe
database.
DifferencesbetweenThree
LevelsofANSISPARC
Architecture
DataIndependence
LogicalDataIndependence
Referstoimmunityofexternalschemasto
changesinconceptualschema.
Conceptualschemachanges(e.g.
addition/removalofentities).
Shouldnotrequirechangestoexternal
schemaorrewritesofapplicationprograms.
10
DataIndependence
PhysicalDataIndependence
Referstoimmunityofconceptualschemato
changesintheinternalschema.
Internalschemachanges(e.g.usingdifferent
fileorganizations,storagestructures/devices).
Shouldnotrequirechangetoconceptualor
externalschemas.
11
DataIndependenceandthe
ANSISPARCThreeLevel
Architecture
12
DatabaseLanguages
DataDefinitionLanguage(DDL)
AllowstheDBAorusertodescribeand
nameentities,attributes,andrelationships
requiredfortheapplication
plusanyassociatedintegrityandsecurity
constraints.
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.
16
DataModels
ObjectBasedDataModels
EntityRelationship
Semantic
Functional
ObjectOriented.
RecordBasedDataModels
RelationalDataModel
NetworkDataModel
HierarchicalDataModel.
PhysicalDataModels
Pearson Education 2015
17
RelationalDataModel
18
NetworkDataModel
19
HierarchicalDataModel
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
25
ComponentsofDatabase
Manager
26
MultiUser
Architectures
DBMS
Teleprocessing
Fileserver
Clientserver
27
Teleprocessing
Traditionalarchitecture.
Singlemainframewithanumberof
terminalsattached.
Trendisnowtowardsdownsizing.
28
FileServer
Fileserverisconnectedtoseveral
workstationsacrossanetwork.
Databaseresidesonfileserver.
DBMSandapplicationsrunoneach
workstation.
Disadvantagesinclude:
Significantnetworktraffic.
CopyofDBMSoneachworkstation.
Concurrency,recoveryandintegritycontrolmore
Pearson Education 2015
complex.
29
FileServerArchitecture
30
TraditionalTwoTierClientServer
Client(tier1)managesuserinterfaceand
runsapplications.
Server(tier2)holdsdatabaseandDBMS.
Advantagesinclude:
wideraccesstoexistingdatabases;
increasedperformance;
possiblereductioninhardwarecosts;
reductionincommunicationcosts;
increasedconsistency.
Pearson Education 2015
31
TraditionalTwoTierClient
Server
32
33
ThreeTierClientServer
Client
side
presented
problems
preventing
scalability:
two
true
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.
35
ThreeTierClientServer
36
TransactionProcessing
Monitors
Programthatcontrolsdatatransfer
betweenclientsandserversinorderto
provideaconsistentenvironment,
particularlyforOnlineTransaction
Processing(OLTP).
37
TPMasmiddletierof3tierclient
server
38