You are on page 1of 21

Lesson2

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

Pearson Education 2009

The Three-Level of the ANSI-SPARC


Architecture
ExternalLevel
Usersviewofthedatabase.
Describesthatpartofdatabasethatisrelevanttoaparticularuser.

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.

Pearson Education 2009

Differences between the Three


Levels of ANSI-SPARC Architecture

Pearson Education 2009

Reasons/Objectives of ThreeLevel Architecture


It allows independent customized user views: Each user
should be able to access the same data, but have a
different customized view of the data. These should be
independent: changes to one view should not affect others.
It hides the physical storage details from users: Users
should not have to deal with physical database storage
details. They should be allowed to work with the data itself,
without concern for how it is physically stored.
The database administrator should be able to change the
database storage structures without affecting the users
views: From time to time rationalizations or other changes
to the structure of an organizations data might be
required.

Pearson Education 2009

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.

Pearson Education 2009

Data Independence
LogicalDataIndependence
Referstoimmunityofexternalschemastochangesinconceptual
schema.
Conceptualschemachanges(e.g.addition/removalofentities)
shouldnotrequirechangestoexternalschemaorrewritesof
applicationprograms.

PhysicalDataIndependence
Referstoimmunityofconceptualschematochangesinthe
internalschema.
Internalschemachanges(e.g.usingdifferentfileorganizations,
storagestructures/devices)shouldnotrequirechangeto
conceptualorexternalschemas.
9

Pearson Education 2009

Database Languages
DataDefinitionLanguage(DDL)
AllowstheDBAorusertodescribeandnameentities,
attributes,andrelationshipsrequiredfortheapplication
plusanyassociatedintegrityandsecurityconstraints.

DataManipulationLanguage(DML)

Providesbasicdatamanipulationoperationsondata
heldinthedatabase.

FourthGenerationLanguages(4GLs)

10

Pearson Education 2009

Data Model
Integratedcollectionofconceptsfor
describingdata,relationshipsbetweendata,
andconstraintsonthedatainanorganization.
DataModelcomprises:
astructuralpart;
amanipulativepart;
possiblyasetofintegrityrules.

11

Pearson Education 2009

Data Model
Purpose
Torepresentdatainanunderstandableway.

Categoriesofdatamodelsinclude:
Objectbased
Recordbased
Physical.

12

Pearson Education 2009

Data Models
ObjectBasedDataModels

EntityRelationship
Semantic
Functional
ObjectOriented.

RecordBasedDataModels
RelationalDataModel
NetworkDataModel
HierarchicalDataModel.

PhysicalDataModels
13

Pearson Education 2009

Relational Data Model

14

Pearson Education 2009

Network Data Model

15

Pearson Education 2009

Hierarchical Data Model

16

Pearson Education 2009

Steps Towards Database Development


ConstructConceptualModel
ConstructLogicalModel
ImplementPhysically

17

Pearson Education 2009

Conceptual Modeling
Conceptualschemaisthecoreofa
systemsupportingalluserviews.
Shouldbecompleteandaccurate
representationofanorganizations
datarequirements.
Conceptualmodellingisprocessof
developingamodelofinformation
usethatisindependentof
implementationdetails.
Resultisaconceptualdatamodel.

18

Pearson Education 2009

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

Pearson Education 2009

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.

You might also like