Académique Documents
Professionnel Documents
Culture Documents
Introduction to Databases
2
Lecture1Objectives
TypicalfunctionsofaDBMS.
MajorcomponentsoftheDBMSenvironment.
PersonnelinvolvedintheDBMSenvironment.
HistoryofthedevelopmentofDBMSs.
AdvantagesanddisadvantagesofDBMSs.
3
ExamplesofDatabaseApplications
Purchasesfromthesupermarket
Purchasesusingyourcreditcard
Bookingaholidayatthetravelagents
Usingthelocallibrary
Takingoutinsurance
UsingtheInternet
Studyingatuniversity
4
Tutorial Exercise
5
FilebasedSystems
Collectionofapplicationprogramsthat
performservicesfortheendusers(e.g.reports).
Eachprogramdefinesandmanagesitsown
data.
6
FilebasedProcessing
7
LimitationsofFilebasedApproach
Separationandisolationofdata
Eachprogrammaintainsitsownsetofdata.
Usersofoneprogrammaybeunawareof
potentiallyusefuldataheldbyotherprograms.
Duplicationofdata
Samedataisheldbydifferentprograms.
Wastedspaceandpotentiallydifferentvalues
and/ordifferentformatsforthesameitem.
8
LimitationsofFilebasedApproach
Datadependence
Filestructureisdefinedintheprogramcode.
Incompatiblefileformats
Programsarewrittenindifferentlanguages,andso
cannoteasilyaccesseachothersfiles.
FixedQueries/Proliferationofapplicationprograms
Programsarewrittentosatisfyparticularfunctions.Any
newrequirementneedsanewprogram.
9
Instructor-Led Practical Exercise
We will take a look at an example program written
in Visual Basic that stores data in a simple
sequential file.
10
Tutorial Question
11
Possible Solution to Tutorial Question
12
Possible Solution to Tutorial Question
Focus was on applications for which programs would be
written, and all the data required would be stored in a file
or files owned by the programs.
Clearly, each program was responsible for only its own
data, which could be repeated in other programs data files.
Different programs could be written in different languages,
and would not be able to access another programs files.
This would be true even for those programs written in the
same language, because a program needs to know the file
structure before it can access it.
13
DatabaseApproach
Arosebecause:
Definitionofdatawasembeddedinapplication
programs,ratherthanbeingstoredseparatelyand
independently.
Nocontroloveraccessandmanipulationofdata
beyondthatimposedbyapplicationprograms.
Result
thedatabaseandDatabaseManagementSystem
(DBMS).
14
Database
Sharedcollectionoflogicallyrelateddata(anda
descriptionofthisdata),designedtomeetthe
informationneedsofanorganization.
Systemcatalog(metadata)providesdescriptionof
datatoenableprogramdataindependence.
Logicallyrelateddatacomprisesentities,
attributes,andrelationshipsofanorganization's
information.
15
DatabaseManagementSystem(DBMS)
Asoftwaresystemthatenablesuserstodefine,
create,andmaintainthedatabaseandwhich
providescontrolledaccesstothisdatabase.
16
Tutorial Question
17
Class Discussion
We will consider this tutorial question and list a
number of key points on the whiteboard
18
DatabaseManagementSystem(DBMS)
19
DatabaseApproach
Datadefinitionlanguage(DDL).
Permitsspecificationofdatatypes,structuresand
anydataconstraints.
Allspecificationsarestoredinthedatabase.
Datamanipulationlanguage(DML).
Generalenquiryfacility(querylanguage)ofthe
data.
20
DatabaseApproach
Controlledaccesstodatabasemayinclude:
Asecuritysystem.
Anintegritysystem.
Aconcurrencycontrolsystem.
Arecoverycontrolsystem.
Auseraccessiblecatalog.
Aviewmechanism.
Providesuserswithonlythedatatheywantorneed
touse.
21
Views
Allowseachusertohavehisorherownviewof
thedatabase.
Aviewisessentiallysomesubsetofthe
database.
22
Views
Benefitsinclude:
Reducecomplexity;
Providealevelofsecurity;
Provideamechanismtocustomizetheappearance
ofthedatabase;
Presentaconsistent,unchangingpictureofthe
structureofthedatabase,eveniftheunderlying
databaseischanged.
23
ComponentsofDBMSEnvironment
24
ComponentsofDBMSEnvironment
Hardware
CanrangefromaPCtoanetworkof
computers.
Software
DBMS,operatingsystem,networksoftware(if
necessary)andalsotheapplicationprograms.
Data
Usedbytheorganizationandadescription
ofthisdatacalledtheschema.
25
ComponentsofDBMSEnvironment
Procedures
Instructionsandrulesthatshouldbeappliedto
thedesignanduseofthedatabaseandDBMS.
People
26
RolesintheDatabaseEnvironment
DataAdministrator(DA)
DatabaseAdministrator(DBA)
DatabaseDesigners(LogicalandPhysical)
ApplicationProgrammers
EndUsers(naiveandsophisticated)
27
Tutorial Question
Discuss the roles of the following personnel in the
database environment:
DataAdministrator(DA)
DatabaseAdministrator(DBA)
DatabaseDesigners(LogicalandPhysical)
ApplicationProgrammers
EndUsers(naiveandsophisticated)
28
Class Discussion
Again we will list main points on the whiteboard
29