You are on page 1of 29

Lecture One

Introduction to Databases

Based on Chapter One of this book:

Database Systems: A Practical Approach


to Design, Implementation and
Management

International Computer Science S.

Carolyn Begg, Thomas Connolly


1
Lecture1Objectives
Somecommonusesofdatabasesystems.
Characteristicsoffilebasedsystems.
Problemswithfilebasedapproach.
Meaningofthetermdatabase.
MeaningofthetermDatabaseManagement
System(DBMS).

2
Lecture1Objectives
TypicalfunctionsofaDBMS.
MajorcomponentsoftheDBMSenvironment.
PersonnelinvolvedintheDBMSenvironment.
HistoryofthedevelopmentofDBMSs.
AdvantagesanddisadvantagesofDBMSs.

3
ExamplesofDatabaseApplications
Purchasesfromthesupermarket
Purchasesusingyourcreditcard
Bookingaholidayatthetravelagents
Usingthelocallibrary
Takingoutinsurance
UsingtheInternet
Studyingatuniversity

4
Tutorial Exercise

Identify four further examples


of database systems

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

Describe the approach taken to the


handling of data in the early file-based
systems. Discuss the disadvantages of
this approach.

11
Possible Solution to Tutorial Question

This answer is intended to give you an idea


of the level of detail I am expecting in the
discussion questions that will come up on
this module
I wont be providing answers to all these
questions!

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

Describe the main characteristics


of the database approach and
contrast it with the file-based
approach.

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

You might also like