Escolar Documentos
Profissional Documentos
Cultura Documentos
DatabaseEnvironment
Lesson outcomes
By the end of the lesson, students should be able to
Describe ANSI-SPARC 3-level database architecture and
state the objectives of such architecture.
Describe external, conceptual and internal levels of the
ANSI-SPARC architecture and the relationships between
them.
State the meaning of logical and physical data
independence.
Distinguish between DDL and DML.
Identify classification of data models.
State the purpose/importance of conceptual modelling.
ANSI-SPARC Architecture
ANSI-SPARC stands for American
National Standards Institute,
Standards Planning And
Requirements Committee.
It is an abstract design standard
for a
Database Management System
(DBMS), first proposed in 1975.
Most modern commercial DBMS
are based on this architecture
ANSI-SPARC Three-Level
Architecture
ConceptualLevel
Communityviewofthedatabase.
Describe what data is stored within the whole database and
how the data is inter-related. The conceptual level does not
specify how the data is physically stored.
DBArelevant.Hardware&softwareindependent
InternalLevel(incl.Physicalstorage)
Physicalrepresentationofthedatabaseonthecomputer.
Describeshowthedataisactuallystored(e.g.,datatype,index)inthe
databaseandthehardware.
Reasons/Objectives of Three-Level
Architecture
The internal structure of the database should
be unaffected by changes to the physical
aspects of the storage: For example, a
changeover to a new disk.
The database administrator should be able to
change the conceptual or global structure of
the database without affecting the users: This
should be possible while still maintaining the
desired individual users views.
Data Independence
LogicalDataIndependence
Referstoimmunityofexternalschemastochangesinconceptual
schema.
Conceptualschemachanges(e.g.addition/removalofentities)
shouldnotrequirechangestoexternalschemaorrewritesof
applicationprograms.
PhysicalDataIndependence
Referstoimmunityofconceptualschematochangesinthe
internalschema.
Internalschemachanges(e.g.usingdifferentfileorganizations,
storagestructures/devices)shouldnotrequirechangeto
conceptualorexternalschemas.
9
Database Languages
DataDefinitionLanguage(DDL)
AllowstheDBAorusertodescribeandnameentities,
attributes,andrelationshipsrequiredfortheapplication
plusanyassociatedintegrityandsecurityconstraints.
DataManipulationLanguage(DML)
Providesbasicdatamanipulationoperationsondata
heldinthedatabase.
FourthGenerationLanguages(4GLs)
10
Data Model
Integratedcollectionofconceptsfor
describingdata,relationshipsbetweendata,
andconstraintsonthedatainanorganization.
DataModelcomprises:
astructuralpart;
amanipulativepart;
possiblyasetofintegrityrules.
11
Data Model
Purpose
Torepresentdatainanunderstandableway.
Categoriesofdatamodelsinclude:
Objectbased
Recordbased
Physical.
12
Data Models
ObjectBasedDataModels
EntityRelationship
Semantic
Functional
ObjectOriented.
RecordBasedDataModels
RelationalDataModel
NetworkDataModel
HierarchicalDataModel.
PhysicalDataModels
13
14
15
16
17
Conceptual Modeling
Conceptualschemaisthecoreofa
systemsupportingalluserviews.
Shouldbecompleteandaccurate
representationofanorganizations
datarequirements.
Conceptualmodellingisprocessof
developingamodelofinformation
usethatisindependentof
implementationdetails.
Resultisaconceptualdatamodel.
18
Conceptual Modeling
Similartoprogramming,beforeyouactuallysitinfrontofthe
terminaltocodeprogrammingstepsusingaprogramming
language(e.g.C++),youshouldhaveabroadidea(algorithm)
howthesolutionshouldbe.
Inprogramming,usually,thisbroadsolutionisvisualizein
flowchartsorsometimespseudocode.
Oncetheflowchartsarethere,theprocessofmappingeach
itemintheflowchartstoanactualprogrammingcodecanbe
donesmoothly.
Indatabase,thebroadideaisvisualizedormodelledintwo
aspects:structure+operation
19
Conceptual Modeling
Thestructureisoftendepictedinadiagrammaticform.The
popularonesarecalledEntityRelationshipDiagram(ERD)
andUMLClassDiagram.
Asfortheoperation,ifUMLdiagramisused,thenthe
operationsnormallywillbeincludedtogetherinthe
diagram.AsforERD,theoperationswillbemodelled
separately,forexample,usingrelationalalgebra.
20
Lesson Summary
ANSI-SPARC 3-level architecture provides 3 different
views of the same database. Topmost view (external) is
different for each type of users. Middle view (conceptual)
is a complete view as seen by the database designer.
The innermost view depends on the DBMS selected.
Database can be constructed using different approaches
(data models).
Whichever data model selected, the development of a
database starts with conceptual modeling, followed by
logical modeling and ends with physical implementation
itself.