Dbms Notes Lecture 1 : Drawbacks of File processing system
537 views
19 slides
Jul 20, 2020
Slide 1 of 19
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
About This Presentation
Introduction to DBMS, Disadvantages of file processing system
Size: 450.5 KB
Language: en
Added: Jul 20, 2020
Slides: 19 pages
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
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