Dbms Notes Lecture 1 : Drawbacks of File processing system

537 views 19 slides Jul 20, 2020
Slide 1
Slide 1 of 19
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19

About This Presentation

Introduction to DBMS, Disadvantages of file processing system


Slide Content

UNIT 1
Introduction to Database Management System
Dinesh Kumar Bhawnani, BIT DURG

Data and Information
•Data is meaningful known raw facts that can be processed and stored
as information.
•For e.g.
•Ram
•Korth
•Samsung
Dinesh Kumar Bhawnani, BIT DURG 2

Database
•Database is a collection of interrelated and organized data.
•For e.g.
•STUDENT
•BOOK
•LIBRARY
Dinesh Kumar Bhawnani, BIT DURG 3

DBMS
•DatabaseManagementSystem(DBMS)isacollectionofinterrelated
data[usuallycalleddatabase]andasetofprogramstoaccess,update
andmanagethosedata[whichformpartofmanagementsystem].
•Itisasoftwarepackagetofacilitatecreationandmaintenanceof
computerizeddatabase.Itisgeneralpurposesoftwarethatfacilitates
thefollowing:
•Defining:Specifyingdatatypesandstructures,andconstraintsfordatatobe
stored.
•Constructing:Storingdatainastoragemedium.
•Manipulating:Involvesquerying,updatingandgeneratingreports.
•Sharing:Allowingmultipleusersandprogramstoaccessdatasimultaneously.
Dinesh Kumar Bhawnani, BIT DURG 4

Examples Of DBMS
•MS Access
•dBase
•FileMaker Pro
•FoxBASE
•ORACLE
•Ingress
•Informix
•MySQL
•MS SQL Server
•IBM DB2
•PostgreSQL
Dinesh Kumar Bhawnani, BIT DURG 5

Primary goals of DBMS
•Toprovideawaytostoreandretrievedatabaseinformationthatis
bothconvenientandefficient.
•Tomanagelargeandsmallbodiesofinformation.Itinvolvesdefining
structuresforstorageofinformationandprovidingmechanismfor
manipulationofinformation.
•Itshouldensuresafetyofinformationstored,despitesystemcrashes
orattemptsatunauthorizedaccess.
•Ifdataaretobesharedamongseveralusers,thensystemshould
avoidpossibleanomalousresults.
Dinesh Kumar Bhawnani, BIT DURG 6

Disadvantages of File Processing System
•DataRedundancy—Sincedifferentprogrammerscreatethefilesand
applicationprogramsoveralongperiod,thevariousfilesarelikelyto
havedifferentformatsandtheprogramsmaybewritteninseveral
programminglanguages.Moreover,thesameinformationmaybe
duplicatedinseveralfiles,thisduplicationofdataoverseveralfilesis
knownasdataredundancy.
•Eg.Theaddressandtelephonenumberofaparticularcustomermay
appearinafilethatconsistsofsaving-accountrecordsandinafile
thatconsistsofchecking-accountrecords.
Dinesh Kumar Bhawnani, BIT DURG 7

Disadvantages of File Processing System
•DataInconsistency—Thevariouscopiesofsamedatamaynolonger
agreei.e.variouscopiesofthesamedatamaycontaindifferent
information.
•Eg.Achangedcustomeraddressmaybereflectedinsavings-account
recordsbutnotelsewhereinthesystem.
Dinesh Kumar Bhawnani, BIT DURG 8

Disadvantages of File Processing System
•Difficultyinaccessingdata—Inaconventionalfileprocessingsystem
itisdifficulttoaccessthedatainaspecificmanneranditisrequire
creatinganapplicationprogramtocarryouteachnewtask.
•E.g.Supposethatoneofthebankofficersneedstofindoutthe
namesofallcustomerswholivewithinaparticularpostal-codearea.
Theofficerasksthedata-processingdepartmenttogeneratesucha
list.Becausethedesigneroftheoriginalsystemdidnotanticipatethis
request,thereisnoapplicationprogramonhandtomeetit.
Dinesh Kumar Bhawnani, BIT DURG 9

Disadvantages of File Processing System
•Data Isolation —Because data are scattered in various files, and files
may be in different formats, writing new application programs to
retrieve the appropriate data is difficult.
Dinesh Kumar Bhawnani, BIT DURG 10

Disadvantages of File Processing System
•Integrityproblems-Thedatavaluesstoredinthedatabasemust
satisfycertaintypesofconsistencyconstraints.
•E.g.Thebalanceofabankaccountmayneverfallbelowaprescribed
amount(say$25).
•Developersenforcetheseconstraintsinthesystembyadding
appropriatecodeinthevariousapplicationprograms.However,when
newconstraintsareadded,itisdifficulttochangetheprogramsto
enforcethem.Theproblemiscompoundedwhenconstraintsinvolve
severaldataitemsfromdifferentfiles.
Dinesh Kumar Bhawnani, BIT DURG 11

Disadvantages of File Processing System
•Atomicityproblems-Acomputersystem,likeanyotherdevice,issubject
tofailure.Inmanyapplications,itiscrucialthat,ifafailureoccurs,thedata
berestoredtotheconsistentstatethatexistedpriortothefailure.
•E.g.Considerabankingsystemwithaprogramtotransfer$500from
accountAtoaccountB.Ifasystemfailureoccursduringtheexecutionof
theprogram,itispossiblethatthe$500wasremovedfromthebalanceof
accountAbutwasnotcreditedtothebalanceofaccountB,resultinginan
inconsistentdatabasestate.Clearly,itisessentialtodatabaseconsistency
thateitherboththecreditanddebitoccur,orthatneitheroccur.Thatis,
thefundstransfermustbeatomic—itmusthappeninitsentiretyornotat
all.
•Itisdifficulttoensureatomicityinaconventionalfile-processingsystem.
Dinesh Kumar Bhawnani, BIT DURG 12

Atomicity Problems (Consistent State)
•A B A+B
•1000 2000 3000
•A = A + 100 B = B -100
•B = B -100 A = A + 100
•A B A+B
•1100 1900 3000
Dinesh Kumar Bhawnani, BIT DURG 13

Atomicity Problems (In -consistent State)
•A B A+B
•1000 2000 3000
•A = A + 100
•B = B -100
•A B A+B
•1100 2000 3100
Dinesh Kumar Bhawnani, BIT DURG 14

Atomicity Problems (In -consistent State)
•A B A+B
•1000 2000 3000
•B = B -100
•A = A + 100
•A B A+B
•1000 1900 2900
Dinesh Kumar Bhawnani, BIT DURG 15

Disadvantages of File Processing System
•Concurrent-accessanomalies-Forthesakeofoverallperformanceofthesystemand
fasterresponse,manysystemsallowmultipleuserstoupdatethedatasimultaneously.In
suchanenvironment,interactionofconcurrentupdatesispossibleandmayresultin
inconsistentdata.
•ConsideraccountA,withabalanceof$10,000.Iftwobankclerksdebittheaccount
balance(bysay$500and$100,respectively)ofaccountAatalmostexactlythesame
time,theresultoftheconcurrentexecutionsmayleavetheaccountbalanceinan
incorrect(orinconsistent)state.Supposethattheprogramsexecutingonbehalfofeach
withdrawalreadtheoldbalance,reducethatvaluebytheamountbeingwithdrawn,and
writetheresultback.Ifthetwoprogramsrunconcurrently,theymaybothreadthevalue
$10,000,andwriteback$9500and$9900,respectively.Dependingonwhichonewrites
thevaluelast,thebalanceofaccountAmaycontaineither$9500or$9900,ratherthan
thecorrectvalueof$9400.
•Toguardagainstthispossibility,thesystemmustmaintainsomeformofsupervision.But
supervisionisdifficulttoprovidebecausedatamaybeaccessedbymanydifferent
applicationprogramsthathavenotbeencoordinatedpreviously.
Dinesh Kumar Bhawnani, BIT DURG 16

Concurrent Access Anamalies
•A B (Joint Accounts)
•1000 1000 (Balance –1000)
•A = A -1000 B = B -1000
Dinesh Kumar Bhawnani, BIT DURG 17

Disadvantages of File Processing System
•Securityproblems-Noteveryuserofthedatabasesystemshouldbe
abletoaccessallthedata.
•Forexample,inauniversity,payrollpersonnelneedtoseeonlythat
partofthedatabasethathasfinancialinformation.Theydonotneed
accesstoinformationaboutacademicrecords.Butsinceapplication
programsareaddedtothefile-processingsysteminanadhoc
manner,enforcingsuchsecurityconstraintsisdifficult.
Dinesh Kumar Bhawnani, BIT DURG 18

For Video lecture on this topic please subscribe to my youtubechannel.
The link for my youtubechannel is
https://www.youtube.com/channel/UCRWGtE76JlTp1iim6aOTRuw?sub
_confirmation=1
Dinesh Kumar Bhawnani, BIT DURG 19