ANALYSISPHASE
INTRODUCTION
ThepurposeofSystemAnalysisistoobtainathoroughanddetailedunderstandingofthebusinessneedasd
efinedinInitiationPhaseandtobreakitdownintodiscreterequirements,whicharethenclearlydefined,re
viewedandagreeduponwiththeCustomerDecisionMakers.DuringSystemAnalysis,theframeworkfortheapplicationisdeveloped,providingthefoundati
onforallfuturedesignanddevelopmentefforts.
SystemRequirementsAnalysiscanbeachallengingphase,becauseallofthemajorCustomersandtheirin
terestsarebroughtintotheprocessofdeterminingrequirements.Thequalityofthefinalproductishighlyd
ependentontheeffectivenessoftherequirementsidentificationprocess.Sincetherequirementsformthe
basisforallfutureworkontheproject,fromdesignanddevelopmenttotestinganddocumentation,itisofth
eutmostimportancethattheProjectTeamcreateacompleteandaccuraterepresentationofallrequiremen
tsthatthesystemmustaccommodate.Accuratelyidentifiedrequirementsresultfromeffectivecommuni
cationandcollaborationamongallmembersoftheProjectTeam,andprovidethebestchanceofcreatingas
ystemthatfullysatisfiestheneedsoftheCustomers.
Requirementsmustbeactionable,measurable,testable,relatedtoidentifiedbusinessneedsoropportunit
ies,anddefinedtoalevelofdetailsufficientforsystemdesign.Requirementscanbefunctionalandnonfunctional.Therequirementsthemselvesarethedescriptionsofthesystemservicesandconstraintsthat
aregeneratedduringtherequirementsanalysisprocess.Requirementsmayrangefromahighlevelabstractstatementofaserviceorofasystemconstrainttoadetailedmathematicalfunctionalspecific
ation.Asmuchaspossible,requirementsshoulddescribewhatthesystemshoulddo,butnothowitshould
doit.
Activitiesofrequirementanalysis
Conceptually,requirementsanalysisincludesfourtypesofactivities:
1. Elicitingrequirements:thetaskofcommunicatingwithcustomersanduserstodeterminewhatt
heirrequirementsare.Thisissometimesalsocalledrequirementsgathering.
2. Analyzingrequirements:determiningwhetherthestatedrequirementsareunclear,incomplet
e,ambiguous,orcontradictory,andthenresolvingtheseissues.
3. Requirementsmodeling:Requirementsmightbedocumentedinvariousforms,suchasnatural
-languagedocuments,usecases,userstories,orprocessspecifications.
4. Reviewandretrospective:Teammembersreflectonwhathappenedintheiterationandidentifie
sactionsforimprovementgoingforward.
CLASSES/TYPESOFREQUIREMENTS
Notes prepared by Ms. Peninah J. Limo
Page 1
Ingeneral,requirementsarestatementsregardingwhatasystemmustdoorwhatcharacteristicsarenecess
arytoachieveadesiredfunctionality.Welldefinedrequirementsarenecessaryforanysolution.Whetheraclientneedsanenhancementoranentirely
newapplication,it’simperativetodefinerequirementsearlyintheproject.Requirementsdrivetheestima
tionoftimeandcostforimplementationofasystemand,ultimately,establishacommonvisionfortheentir
eproject.Requirementsaregenerallyclassifiedintothreetypesofclassesthisinclude:
Functionalrequirements
Non-functionalrequirements
FunctionRequirements
Functionalrequirementsarestatementsofservicesthatthesystemshouldprovide,howthesystemshould
reacttoparticularinputsandhowthesystemshouldbehaveinparticularsituationsingeneralitdescribesfu
nctionalityorsystemservices.
Thisdependonthetypeofsoftware,expectedusersandthetypeofsystemwherethesoftwareisused.Funct
ionaluserrequirementsmaybehighlevelstatementsofwhatthesystemshoulddo;functionalsystemrequirementsshoulddescribethesystem
servicesindetail.
Asageneralrule,functionalrequirementsareusuallywrittenoutas“shall”statements.Specificfunctiona
lrequirementsoftenincludethefollowing:
Userinterfacerequirements—
theinputandoutputneedsoftheuserthatmustbeprovidedforbythenewcomputerinformationsy
stem.
2. Processingrequirements—
theactivitiesrequiredforconvertinginputintooutput,includingcalculations,decisionrules,dat
abaseoperations,andotherprocessingoperations.
3. Storagerequirements—
theorganization,content,andsizeofdatabases,andtypesandfrequencyofupdatesandinquiries.
Furthermore,backupproceduresandthelengthoftimeandrationaleforretentionofbackupsared
elineated.
4. Controlrequirements—
theaccuracy,validity,security,andadaptabilityrequirementsforthesystem'sinput,processing,
output,anddatabases.Crashrecoveryandauditingrequirementsoftheorganizationarefurthersp
ecifiedinthisstage.
1.
Examples1:fuctionalrequirementsforclinicsystem
Notes prepared by Ms. Peninah J. Limo
Page 2
Ausershallbeabletosearchtheappointmentslistsforallclinics.
Thesystemshallgenerateeachday,foreachclinic,alistofpatientswhoareexpectedtoattendappo
intmentsthatday.
Eachstaffmemberusingthesystemshallbeuniquelyidentifiedbyhisorher8digitemployeenumber.
Examples2:functionalrequirementsforWineinventoryandsalesmanagement:
1. Wineinventorymanagement
Thesystemshallallowmanagerstoviewthenewwineinventory.
Thesystemshallallowthemanagertoplaceordersfornewwines.
Thesystemshallrecordtheadditionofnewwinestoinventorywhentheyarereceivedfro
mdistributors.
2. Winesalesmanagement
Thesystemshallenablesalesassociatestocreatecustomerprofiles.
Thesystemshalltrackandmaintainallwinesalestransactions.
Thesystemshallcreaterecordsofallwinepurchases.
Non-FunctionalRequirements
Nonfunctionalrequirementsdefinesystempropertiesandconstraintse.g.reliability,responsetimeandstora
gerequirements.ConstraintsareI/Odevicecapability,systemrepresentations,etc.Processrequirement
smayalsobespecifiedmandatingaparticularIDE,programminglanguageordevelopmentmethod.Non
functionalrequirementsmaybemorecriticalthanfunctionalrequirements.Ifthesearenotmet,thesystem
maybeuseless.
Nonfunctionalrequirementsmayaffecttheoverallarchitectureofasystemratherthantheindividualcompon
ents.Asinglenonfunctionalrequirement,suchasasecurityrequirement,maygenerateanumberofrelatedfunctionalrequi
rementsthatdefinesystemservicesthatarerequired.Itmayalsogeneraterequirementsthatrestrictexistin
grequirements.
Asarule,thenonfunctionalrequirementsprimarilyincludevariousproductqualityattributesdeterminingsystemquality
features,mostoftenaslistedbelow:
Notes prepared by Ms. Peninah J. Limo
Page 3
1. Availability–
requirementsforappcontinuousrunning,forexample,24/7,minimumidletime,etc.
2. Reliability–
Requirementsabouthowoftenthesoftwarefails.ThemeasurementisoftenexpressedinMTBF(
meantimebetweenfailures).Thedefinitionofafailuremustbeclear.forexample,systemmustcr
ashonaverageonceevery6months.
3. Scalability–waystoexpandthesystemandavoidadverselyaffectedperformance.
4. Performance–
Requirementsaboutresourcesrequired,responsetime,transactionrates,throughput,benchmar
kspecificationsoranythingelsehavingtodowithperformance.Forexample“Theresponsetimef
orasearchtransactionunderapeakloadof10,000usersmustnotexceed2seconds”
5. SecuritySecuritynonfunctionalrequirementscoverthesystemqualitiesconcernedwithensuringthesafety,c
onfidentialityandintegrityofthetotalsolution;includessoftware,hardware,communications,user
accessanddevices.Forexample“ThesystemmustauthenticateauserviaauserloginIDandpasswor
d.”
6. UsabilityUsabilitynonfunctionalrequirementscoverthesystemqualitiesconcernedwiththeeasewithwhich
ausercanlearntooperate,prepareinputsfor,andinterpretoutputsofasystemorcomponent.Theseno
nfunctionalrequirementsmeasureaproducts’potentialtoaccomplishthegoalsoftheuser.Forexam
ple“Theapplicationshallbeusablebypersonswithauditorydisabilities.”
7. PortabilityTheeffortrequiredtomovethesoftwaretoadifferenttargetplatform.Themeasurementismostco
mmonlyperson-monthsor%ofmodulesthatneedchanging.
8. Extensibility–
requirementsforappextensibilityincasethereisaneedtoaddnewfunctionalrequirements.
9. ComplianceCompliancenonfunctionalrequirementscoverthebroadrangeofspecificationstoensurethatthe
solutionconformstorules,suchasaspecification,policy,standardorlawsetbybothinternalande
xternalpartiestotheorganization.Forexample“Allapplicationdatamustbestoredincomplianc
ewiththeInformationSecurityDataStorageProtectionstandards.”
ExamplesofNon-functionalrequirements
Here,aresomeexamplesofnon-functionalrequirement:
1. Usersmustchangetheinitiallyassignedloginpasswordimmediatelyafterthefirstsuccessfullogi
n.Moreover,theinitialshouldneverbereused.
2. Employeesneverallowedtoupdatetheirsalaryinformation.Suchattemptshouldbereportedtoth
esecurityadministrator.
3. Everyunsuccessfulattemptbyausertoaccessanitemofdatashallberecordedonanaudittrail.
Notes prepared by Ms. Peninah J. Limo
Page 4
4. Awebsiteshouldbecapableenoughtohandle20millionuserswithaffectingitsperformance
5. Thesoftwareshouldbeportable.SomovingfromoneOStootherOSdoesnotcreateanyproblem.
6. Privacyofinformation,theexportofrestrictedtechnologies,intellectualpropertyrights,etc.sho
uldbeaudited.
1. DATAMODELINGTECHNIQUES
ThesearetechniquesareallusedattheFIRSTstageofanalysis.Datamodelingistheprocessofcreatingavi
sualrepresentationofeitherawholeinformationsystemorpartsofittocommunicateconnectionsbetwee
ndatapointsandstructures.Thegoalistoillustratethetypesofdatausedandstoredwithinthesystem,there
lationshipsamongthesedatatypes,thewaysthedatacanbegroupedandorganizedanditsformatsandattri
butes.
ADataModelisanabstractrepresentationofanaspectofrealworldintheformofalistofdataelementsandt
heirrelationships.
Duringanalysis,analystsdrawalogicaldatamodel,whichshowsthelogicalorganizationofdatawithouti
ndicatinghowdataarestored,created,ormanipulated.Becausethismodelisfreeofanyimplementationo
rtechnicaldetails,theanalystscanfocusmoreeasilyonmatchingthediagramtotherealbusinessrequirem
entsofthesystem.Datamaybemodeledusingvarioustechniquesthisinclude:
A.
Datadictionary
Entity-relationshipmodel(orLogicalDataStructure)
DATADICTIONARY
Mostoftheactivitiesundertakenbyasystemanalystisanalyzingaproblemanddesigningsystemtosolvet
hatproblemrelatedtodata.Theanalystmustlearnallaboutallthedatathatanexistingsystemusesorgener
ates.Additionally,theanalystmustcarryforwardtoanewsystemdatathatareusableandaddotherdatareq
uiredbythesystem.Beforethedesignofanewsystemcanbegin,allofthedataelementsusedbythesystema
ndtherelationshipsbetweenthemmustbedefinedandexplained.
Datadictionaryisthecentralizedcollectionofinformationaboutdataoftenreferencedasmetadata.Itstoresmeaningandoriginofdata,itsrelationshipwithotherdata,dataformatforusageetc.Datadict
ionaryhasrigorousdefinitionsofallnamesinordertofacilitateuserandsoftwaredesigners.
Ananalystusesthedatadictionarytocollect,document,andorganizespecificfactsaboutthesyste
m,includingthecontentsofdataflows,datastores,entities,andprocesses.InadditionDatadictionaryrem
Notes prepared by Ms. Peninah J. Limo
Page 5
ovesanychancesofambiguity.Ithelpskeepingworkofprogrammersanddesignerssynchronizedwhileu
singsameobjectreferenceeverywhereintheprogram.
Thedatadictionaryalsodefinesanddescribesalldataelementsandmeaningfulcombinationsofd
ataelements.Adataelement,alsocalledadataitemorfield,isthesmallestpieceofdatathathasmeaning
withinaninformationsystem.Datadictionaryprovidesawayofdocumentationforthecompletedatabas
esysteminoneplace.
AdatadictionaryismainlyusedforValidationofDFDsinceitstoresthedescriptionsofallDFDdat
aelementsthatis,detailsanddefinitionsofdataflows,datastores,datastoredindatastores,andtheprocess
es.HenceAdatadictionaryiscreatedalongwithDFD(DataFlowDiagram)modelofsoftwareprograman
disexpectedtobeupdatedwheneverDFDischangedorupdated.
Adatadictionaryentryshouldcontainatleast’sthefollowingfourelements:
i.
ii.
iii.
iv.
v.
Nameofthedatastructure.
Identificationofthedatastructureasadataflow,adataflow,adatastoreordataelements.
OtherNamesbywhichthedatastructureiscalled
Definitionofthecontentofthedatastructure.
SignificantComments.
Eachdatadictionaryentryshouldbedefinedcompletely,concisely,andcorrectly.Asetofsymbolsthatca
nbeusedtodefinedatadictionaryinclude:
Braces{},-whichindicatethatanitemmayberepeated.
Underlines-whichidentifytheitemasakey.
Parenthesis()-whichindicatethatthedataisoptional
+-Whichindicatesalink/And.
=-Whichindicatecomposedof
[]–WhichindicateOr
Example
Anexampletoillustrateadatadictionaryentryforadataflow.Thisexampleshowthedatastructureforana
ccountapplicationwhichispartofanaccountsreceivableA/Rsystem.
Notes prepared by Ms. Peninah J. Limo
Page 6
DataDictionaryEntry
NameofDatastructure:Account–Application
TypeofDataStructure:Dataflow
OtherNames:Customer-Account-Application.
Content:
Account-Application=FirmName+
Wholesale/Retailcode+
Date+
Telephone+
StreetAddress+
City-State-Zipcode+
ReferenceName+
(Branch)+
Telephone+
StreetAddress+
City-State-Zipcode+
Account-Number+
Effective-Date+
Credit–Code+
Discount-Code+
COMMENT:Ifreferenceisabank,branchshouldbeidentified:Else,thisitemmaybeomitted.Fi
rmnameisincludedasakeyfieldinordertoproduceanalphabeticlistingofcustomeraccount.
Notes prepared by Ms. Peninah J. Limo
Page 7
Advantages
1. Documentation:itisavaluablereferenceinanyorganization.
2. Improvinganalyst/usercommunicationbyestablishingconsistentdefinitionsofvariouselemen
ts,termsandprocedures.
3. Itisagoodtoolformanageoperatorsandothermembersofthedevelopmentteamtounderstandre
quirementsanddesign.
4. Duringimplementation,itservesasacommonbaseagainstwhichprogrammerswhoareworking
onthesystemcomparetheirdatadescriptions.
5. Ithelpstheanalysttosimplifythestructureformeetingthedatarequirementsofthesystem.
6. Itisjustlikeastoreofalldataelementsinformationthatcanlinkallphasesofsoftwaredevelopment
lifecycle.
7. controlinformationmaintainedforeachdataelementiscross-referencedinthedata
dictionary.
8. Theenforcementofstandards.
9. Itisusedtoremovetheredundancyindatadefinition.
10. Itisanimportantstepbuildingadatabase.Mostdatabasemanagementsystemhasadatadictionar
yasastandardfeature.
11. Bettermeansofestimatingtheeffectofchange.
Disadvantages
Itdoesnotprovidefunctionaldetails.
2. Itisnotacceptabletomanynontechnicalusers.
1.
B.
ENTITYRELATIONSHIPDIAGRAM(ERDORERDIAGRAM)
Anentityrelationshipdiagramisadatamodelingtechniquethatcreatesagraphicalrepresentationoftheentities,an
dtherelationshipsbetweenentities,withinaninformationsystem.Itismainlyusedmodeldatarequireme
ntsforadatabase.
MAINCOMPONENTSOFANERD
(i)
Entity
Entitiesaretheprincipaldataobjectsaboutwhichinformationistobecollected.Entitiesareusuallyrecog
nizableconcepts,eitherconcreteorabstract,suchasperson,places,thingsoreventswhichhaverelevance
tothedatabase.Someexamplesofentitiesincludeemployees,projects,invoices.Anentityisrepresented
asrectangleinanERdiagram.
Notes prepared by Ms. Peninah J. Limo
Page 8
WeakEntity
Aweakentityisakindofentitywhichdoesn’thavekeyattribute.Itdependsonotherentitywhichhasprima
rykeytouniquelyidentifyitself,forthisweakentitiesneedparticipation.Weakentityisrepresentedbydo
ublerectangle.
Anentitylikeorderitemisagoodexampleforthis.Theorderitemwillbemeaninglesswithoutanordersoit
dependsontheexistenceoftheorder.
EntityType:Collectionofentitiesthatallhavethesameattributes,e.g.,persons,cars,customersetc.
EntitySet:Collectionofentitiesofaparticularentitytypeatanypointintime;entitysetistypicallyreferred
tousingthesamenameasentitytype.
(i)
Attributes
Anattributeisaproperty,trait,orcharacteristicofanentity,relationship,oranotherattribute.e.g.aperson
hasanameusuallyfirstandlastandaphonenumber;aprojectusuallyhasaname,durationandbudget.Anat
tributeisrepresentedasOvalinanERdiagram.Therearefourtypesofattributes:
Keyattribute
Compositeattribute
Multivaluedattribute
Derivedattribute
KeyAttributeThekeyattributeistheattributethatuniquelyidentifiestheeachentityinaentityset.Forexample:Roll.No
canbeakeyattributewhereitidentifieseachstudentintheclass(entityset)uniquely.Keyattributesareden
otedsameasattributebutwithunderlineonname.
Notes prepared by Ms. Peninah J. Limo
Page 9
SingleValueAttributeSinglevalueattributesaresimpleattributesthatcontainonlyonevalue.Theseattributesarerepresentedus
ualellipsis.
Forexample:roll_no,social_security_number,drivinglicensenumber
CompositeAttributeCompositeattributeareattributeswhicharemadeoftwoormoresimpleattribute.Compositeattributeare
representedbyellipsescomprisedofellipses.
DerivedAttributeDerivedattributesareattributesthatdonotreallyexistinthephysicaldatabase.But,theseattributesareder
ivedfromotherattributesofentity.Derivedattributesarerepresentedbydashedovals.
Forexample:ageisaderivedattributewhichdon’treallyneedaplaceinphysicaldatabasesinceitcanbeder
ivedfromDOB.
MultivaluedAttributeItistheattributethatmayholdmorethanonevalue.Multivaluedattributesarerepresentedbydoubleellips
es.
Examplesofmultivaluedattributesare“phonenumber”,“email”and“address”.
(ii)
Relationships
Relationshiprepresentanassociationbetweentwoormoreentities.Verbsoftendescriberelationshipsbe
tweenentities.ForexampleManager“manages”team,Account“has”cash,Owner“owns”property.Re
lationshipisrepresentedbydiamondsymbol
Notes prepared by Ms. Peninah J. Limo
Page 10
Relationshipareclassifiedintermsof
Degree
cardinality,andordinality.
DegreeofRelationship
Thedegreeofrelationshipisdefinedbythenumberofparticipatingentitiesintherelationship
Unary(recursive):Arecursivebinaryrelationshipoccurswhenanentityisrelatedtoitself.Forex
ampleanemployeecanbeasupervisorandbesupervised,sothereisarecursiverelationship.
Binary:Binaryrelationship,theassociationbetweentwoentitiesisthemostcommontypeintherealworld
.
Ternary:ThreeEntitiesparticipateinarelationship.Aternaryrelationshipisinadequate.Mostmodelinga
pproachesrecognizeonlybinaryrelationships.
N-ary:-Morethanthreeentitysetsparticipationinarelationship.Ternaryornaryrelationshipsaredecomposedintotwoormorebinaryrelationship.
RelationshipCardinalityandOrdinality
Cardinalityisthedegreetowhichdifferententitiesorentitysetsarerelatedorassociated.Itdefinesnumb
erofentitiesinonentitysetthatcanbeassociated(related)withnumberofentitiesinothersetatmostwhile
Ordinalityistheminimumnumberofentitiesinoneentitysetthatcanbeassociatedwithotherentityset.D
ifferenttypesofCardinality(relationships):
One–to-onerelation
One–to-manyrelationship
many-to-manyrelationship
One–to-onerelation
Notes prepared by Ms. Peninah J. Limo
Page 11
Aone-toone(1:1)relationshipiswhenatmostoneinstanceofanentityAisassociatedwithoneinstanceofentityB.
Example1:
Astudenthasonlyoneidentificationcardandanidentificationcardisgiventooneperson.(peterchennotat
ion)
Example2
Eachstudentfillsoneseatinaclass.Eachseatisfilledbyonestudent.(crowfootnotation)
one-to-manyrelationship
Aone-tomany(I:N)relationshipiswhenforoneinstanceofentityA,therearezero,one,ormanyinstancesofentity
B,butforoneinstanceofentityB,thereisonlyoneinstanceofentityA.
Example1:
Onedepartmenthasmultipleinstructorsandoneinstructorbelongstooneandonlyonedepartment,hencether
elationshipisonetomany.
Example2
Notes prepared by Ms. Peninah J. Limo
Page 12
Inthenextexampleasingleinstructormayteachseveralcourses.Eachcoursehasonlyoneinstructor.This
isaone-to-manyrelationship.(crowfootnotation)
Many-to-OneRelationship
Whenmorethanoneelementofanentityisrelatedtoasingleelementofanotherentity,thenitiscalledaman
y-to-onerelationship.
Example1
Onecourseistaughtbyonlyoneinstructorbutoneinstructorteachesmanycourseshencetherelationshipbetw
eencourseandinstructorismanytoone.
Many-to-many
Amany-to-many(M:N)relationship,sometimescallednonspecific,iswhenforoneinstanceofentityA,therearezero,one,ormanyinstancesofentityBandforoneins
tanceofentityBtherearezero,oneormanyinstancesofentityA.
Example1
Example2
Asshownbelow,asinglestudentmayregisterforseveralcourses.Asinglecoursecanhavemanystudents
enrolledinit.Thisisthemany-to-manyrelationship.
Notes prepared by Ms. Peninah J. Limo
Page 13
MostEntityrelationshipdiagramuseCrow'sFootnotation.Usingthisnotationentitiesarerepresentedby
rectangesandrelationshipsareindicatedbylinesconnectingtherectangles.Cardinalityisshownbyaseri
esof"tickmarks"and"crowsfeet"superimposedontherelationshiplines.
STEPSINVOLVEDINCREATINGERD
1.
First,identifyalltheEntities.Embedalltheentitiesinarectangleandlabelthemproperly.
2.
Identifyrelationshipsbetweenentitiesandconnectthemusingadiamondinthemiddle,illustratingth
erelationship.Donotconnectrelationshipswitheachother.
3.
Connectattributesforentitiesandlabelthemproperly.
4.
Eradicateanyredundantentitiesorrelationships.
5.
MakesureyourERDiagramsupportsallthedataprovidedtodesignthedatabase.
6.
Effectivelyusecolorstohighlightkeyareasinyourdiagrams.
Advantages
1. Simple : ItissimpletodrawanERdiagramwhenweknowentitiesandrelationships.
2. Effective: Itisaneffectivecommunicationtooltoolfordatabasedesigners
3. EasyToUnderstand: ThedesignofERisverylogicalandhencetheyareeasy todesignandunders
tand.
4. Integrated: TheERModelcanbeeasilyintegratedwithrelationalmodelbysimplyconvertingER
modelintotables.
5. Scalability: ERmodelscanbeusedfordatabasesofvaryingsizes,fromsmalltolarge.
Notes prepared by Ms. Peninah J. Limo
Page 14
6. VisualRepresentation: ERmodelsprovideavisualrepresentationofthedatabasestructure,maki
ngiteasierforstakeholderstounderstandandprovidefeedback.
7. Documentation: ERmodelsprovideusefuldocumentationforfuturereference,makingiteasiert
omaintainandupdatethedatabaseinthelongrun.
disadvantages
1. Noindustrystandardfornotation: ThereisnoindustrystandardnotationfordevelopinganERdiagram.
2. LackofSupportForBusinessRules: ERmodelsdonotprovidesupportforbusinessrules,which
canmakeitdifficulttoensuredataintegrityandenforceconstraints.
3. DifficultToScale: ERmodelscanbedifficulttoscaletoaccommodatelargerdatasets.Astheamou
ntofdatainthedatabasegrows,theERmodelmayneedtobemodifiedtohandletheincreasedcomple
xity.
4. DependenceOnUserUnderstanding: ERmodelsrelyheavilyontheunderstandingoftheuserto
correctlyidentifytheentitiesandrelationships.
2.PROCESSMODELLLINGTOOLS
ThesetoolsareusedattheSECONDstageofanalysisordesign.Processmodeling involvesgraphicallyr
epresentingtheprocesses,oractions,thatcapture,manipulate,store,anddistributedatabetweenasystem
anditsenvironmentandamongcomponentswithinasystem.Theonemaintechniqueis:
Dataflowdiagrams.
DATAFLOWDIAGRAMSDFD
Adataflowdiagramisawaytovisualizetheinformationmovementofdatabetweenexternalentitiesandth
eprocessesanddatastoreswithinasystem.DFDshelpsystemdesignersandothersduringinitialanalysiss
tagesvisualizeacurrentsystemoronethatmaybenecessarytomeetnewrequirements.Adataflowdiagra
mcanbecreatedmanually,automated,oracombinationofbothofthese.
SystemsanalystspreferworkingwithDFDs,particularlywhentheyrequireaclearunderstandingoftheb
oundarybetweenexistingsystemsandpostulatedsystems.Itcanalsobeusedasacommunicationtoolbet
weenthesystemanalystandthepersonwhoplaysavitalroleinthesystemthatactsasastraightpointforrede
signingasystem.
DFD’srepresentthefollowing:
a) Externaldevicessendingandreceivingdata
Notes prepared by Ms. Peninah J. Limo
Page 15
b) Processthatchangethatdata
c) Dataflowsthemselves
d) Datastoragelocation
DFDCOMPONENTS
DFDsconsistoffourbasiccomponentsthatillustratehowdataflowsinasystem:entity,process,datastore
anddataflow.
i. Entity
Anentityisthesourceordestinationofdata.ThesourceinaDFDrepresentstheseentitiesthatareoutsideth
econtextofthesystem.Entitieseitherprovidedatatothesystem(referredtoas–
source)orreceivedatafromit(referredtoasasink).Entitiesareoftenrepresentedasrectangles(adiagonall
ineacrossthetherighthandcornermeansthatthisentityrepresentssomewhereelseintheDFD.Entitiesar
ealsoreferredtoasagents,terminators,orsource/sink
ii.
Process
Theprocessisthemanipulationorworkthattransformsdata,performingcomputations,makingdecision
s(logicflow)ordirectorydataflowsbasedonbusinessrules.Inotherwords,aprocessreceivesinputandge
neratessomeoutput.Processnames(simpleverbsanddataflowname,suchas“submitpayment”or“getin
voice”)usuallydescribesthetransformation,whichcanbeperformedbypeopleormachines.Processcan
bedrawnasacircleorasegmentedrectangleonaDFD,andincludeaprocessnameandprocessnumber.
iii. Datastore
Adatastoreiswhereaprocessstoresdatabetweenprocessesforlaterretrievalbythatsameprocessoranoth
erone.Filesandtablesareconsidereddatastores.Datastorenames(plural)aresimplebutmeaningfulsuch
as“customers”,“orders”and“products”.Datastoresareusuallydrawnasarectanglewiththerighthandsi
demissinglabeledbythenameofthedatastorageareaitrepresents,thoughdifferentnotationsdoexist.
(iv)Dataflow
Dataflowisthemovementofdatabetweentheentitytheprocess,andthedatastore.Dataflowportraysthei
nterfacebetweenthecomponentsoftheDFD.TheflowofdatainaDFDisnamedtoreflectthenatureofthed
atausedthesenamesshouldalsobeuniquewithinaspecificDFD).Dataflowisrepresentedbyanarrowwh
osethearrowisannottedwiththedataname.
SYMBOLSANDNOTATIONSUSEDINDFDS
Twocommonsystemsofsymbolsarenamedaftertheircreators:
YourdonandCoad
YourdonandDeMarco
Notes prepared by Ms. Peninah J. Limo
Page 16
GaneandSarson
OnemaindifferenceintheirsymbolsisthatYourdon-CoadandYourdonDeMarcousecirclesforprocesses,whileGaneandSarsonuserectangleswithroundedcorners,sometime
scalledlozenges.Thereareothersymbolvariationsinuseaswell,sotheimportantthingtokeepinmindisto
beclearandconsistentintheshapesandnotationsyouusetocommunicateandcollaboratewithothers.
GENERALGUIDELINESOFDFD’S
a) Datastoresarestorageareasandarestaticorpassive;therefore,havingdataflowdirectlyfromone
datastoretoanotherdoesn’tmakesensebecauseneithercouldinitiatethecommunication.
b) Datastoresmaintaindatainaninternalformat,whileentitiesrepresentpeopleorsystemsexternal
tothembecausedatafromentitiesmaynotbesyntacticallycorrectorconsistent,itisagoodideatoh
avedataflowdirectlybetweenadatastoreandanentity,regardlessofdirection
c) Dataflowbetweenentitieswouldbedifficultbecauseitwouldbeimpossibleforthesystemtokno
waboutanycommunicationbetweenthem.Theonlytypeofcommunicationthatcanbemodeledi
sthatwhichthesystemisexpectedtoknoworreactsto
d) ProcessesonDFDshavenomemory,soitwouldnotmakesensetoshowdataflowsbetweentwoas
ynchronousprocesse(betweentwoprocessesthatmayormaynotbeactivesimultanoiusly)beca
usetheymayrespondtodifferentexternalevents
Therefore,dataflowshouldonlyoccurinthefollowingscenarios:
Betweenaprocessandaentity(ineitherdirection)
Betweenaprocessandadatastore(ineitherdirection)
Notes prepared by Ms. Peninah J. Limo
Page 17
Betweentwoprocessesthatcanonlyrunsimultaneously
LEVELSOFDFD
ContextLevelDFD’s
AcontextlevelDFDisthemostbasicformofDFD.Itaimstoshowhowtheentiresystemworksataglance.T
hecontextleveldiagramisintendedtoidentifythesystemboundarywithregardtoitsrelationshiptoanyso
urceorsinkentitiesthatmayinteractwithit.Assuch,thecontextdiagramcontainsonlyoneprocess,labele
dwiththenameofthesystemandassignedazeroasitsidentifier.TheydonotcontainDataStores.contextle
velDFDsarealsoknownasLevel0DFDs.
Level1DFD’s
In1levelDFD,contextdiagramisdecomposedintomultipleprocesses.Inthislevelwehighlightthemainfun
ctionsofthesystemandbreakdownthehighlevelprocessof0levelDFDintosubprocesses.Level1DFD’salsoindentifiesdatastoresthatareusedbythemajorprocesse
s.
Notes prepared by Ms. Peninah J. Limo
Page 18
Level2DFD’s
Level2DFDgoesonestepdeeperintopartsof1levelDFD.Itcanbeusedtoplanorrecordthespecific/necessarydetailaboutthesystem’sfunctioning.
Level2-Atthislevel,DFDshowshowdataflowsinsidethemodulesmentionedinLevel1.
HigherlevelDFDscanbetransformedintomorespecificlowerlevelDFDswithdeeperlevelofunderstan
dingunlessthedesiredlevelofspecificationisachieved.
Advantages
1. Easytounderstandfortechnicalornon-technicalpersonsbecauseitusessimplesymbols.
Notes prepared by Ms. Peninah J. Limo
Page 19
2. Becauseitisveryhighlevel,ithelpstodefinetheboundariesofthesystem.
3. Theabilitytorepresentthesystemindifferentlevels.Aglobalmodelinthefirstlevelcanbeworkedoutinm
oredetailinthelowerlevels.
4. Representtheinformationofdatamovements,thisgivesaclearviewofwhatcomesintheprocessandwhat
not.
5.
6.
7.
8.
9.
1.
2.
3.
4.
5.
Providesagoodsystemdocumentation.
Itisusefulforcommunicatingcurrentsystemknowledgetotheuser.
Dataflowdiagramhelptosubstantiatethelogicunderliningthedataflowoftheorganization.
Itgivesthesummaryofthesystem.
DFDisveryeasytofollowerrorsanditisalsousefulforquickreferencetothedevelopmentteamfo
rlocatingandcontrollingerrors.
Disadvantages
Modelingalargesystemwillresultinbigmodelsthatarevagueandprobablywillnotcoverthewho
lesystem.
BecauseDFDisveryhighlevel,itisn’tveryusefulwhenmodelingcomplexprocesses.
DifferentDFDmodelsemploydifferentsymbols.
Itdoesnotdefinewhethertheprocesseswilloperateinsequenceorparallel.
Uselessifwithoutthepre-requisitedetailsofthesystem.
3.LOGICMODELLINGTECHNIQUES
Thesetechniquesusedtodefinethepreciseoperationofanindividualprocessorthestructureofadatastore
.Logicmodelsarenarrativeorgraphicaldepictionsofprocessesthatcommunicatetheunderlyingassum
ptionsuponwhichanactivityisexpectedtoleadtoaspecificresult.Logicmodelsillustrateasequenceofca
use-and-effectrelationshiptocommunicatethepathtowardadesiredresult.
QuiteoftenthesetechniquesformtheFINALstageofanalysisandareusedafterdataflowdiagrams,todes
cribeindividualelementsonthelowestleveldataflowdiagrams.
Decisiontables
Decisiontrees
StructuredEnglish
A. DECISIONTABLE
Adecisiontableisatabulartechniquefordescribinglogicalrules.Itisanimportanttoolforthesystemanal
ystbecausetheyareaneffectivemeansofexpressingthelogicofadministrativerulesandprocedure.Syste
manalystsoftenusedecisiontablesasameansofcommunicatingthesystemlogic,embeddedinpoliciesa
ndprocedures,totheprogrammer.Whenthesetypesoflogicaremadeavailable,theprogrammerisableto
domoreeffectivejobofdevelopingdetailedcomputerprogramlogic.
Notes prepared by Ms. Peninah J. Limo
Page 20
ComponentsofaDecisionTable
Adecisiontablehasfourparts/componentsasdepictedinitsbasicformatofadecisiontablebelow.
1. ConditionStubs−Itisintheupperleftquadrantwhichlistsalltheconditiontobechecked.
2. ActionStubs−Itisinthelowerleftquadrantwhichoutlinesalltheactiontobecarriedouttomeetsu
chcondition.
3. ConditionEntries−Itisinupperrightquadrantwhichprovidesanswerstoquestionsaskedincon
ditionstubquadrant.TherearetwodistincttypesofConditionEntries:
i.
ii.
alimitedentryformat,inwhichtheentireconditioniswrittenintheConditionStubsandeachc
onditionentryisusedtoshowwhethertheconditionisTRUE,FALSE,ornotpertinent;usuallyde
noted'Y','N',or'-',respectively.
anextendedentryformat,inwhichpartoftheConditionStubiswrittendirectlyintotheConditi
onEntry.Forexample,theentrycouldcontainanindicationofwhetheracertainvariablewasl
essthan,equalto,orgreaterthanaparticularvalue.e.g>40,<100e.t.c
4. ActionEntries−Itisinlowerrightquadrantwhichindicatestheappropriateactionresultingfrom
theanswerstotheconditionsintheconditionentryquadrant.InactionentryX(oracheckmarkisus
edagainstactiontostateitistobecarriedout.
Conditionstubsareconnectedtotheirrelatedactionstubsviarules.Aruleisaverticalcolumnthatincludes
oneormoreconditionentriesandoneormoreactionentries.Whentheconditionstub(s)associatedwithag
ivenrulearemet,theactionentriesincludedintheruledenotetheactionstub(s)tobeperformed.
ADecisionTableisreadvertically,witheachsinglecolumndefiningasingledecisionrule.Theverytopro
wofConditionstubsshouldbereadasifithasanIF…infrontofitandthefirstrowoftheActionstubsshould
Notes prepared by Ms. Peninah J. Limo
Page 21
bereadasifithadaTHEN…infrontit.Eachsubsequentrowofboththeconditionstubsandactionstubssho
uldbereadasiftheyhaveanAND…infrontofthem.SoifyouarereadingtheDecisionRule1columnabove
,itwouldbereadas:
IFCondition1istrue,
ANDCondition2isfalse,
ANDCondition3isfalse;
THENtakeAction1.”
Thecombinationofconditionstubsandconditionentriesinacolumndefinetheconditionswhichapplyor
mustbesatisfied;andthecombinationofactionstubsandactionentriesbelowinthatcolumndefinetheacti
onsthatareexecutedorwhichresultasaresponsetotheconditionsabove.
ElseColumns
Finally,sometimesadecisiontablewillcontainanELSEcolumnatthefarright.Thisisasingledecisionrul
ethatessentiallysaysthatifanyofthepreviousrulesintable(totheleftoftheELSEcolumn)werenottrigger
ed,thantaketheaction(s)specifiedintheELSEcolumn.Thisisawayofsimplifyingadecisiontablewhere
onlycertainconditionsetsrequirespecializedresponsesandallotherconditionscanberespondedtowitht
hesameaction.
DEVELOPINGDECISIONTABLES
Inordertobuilddecisiontables,youneedtodeterminethemaximumsizeofthetable,eliminateanyimposs
iblesituations,inconsistencies,orredundancies,andsimplifythetableasmuchaspossible.Thefollowin
gstepsprovideoffersomeguidelinestodevelopingdecisiontables:
1.Determinethenumberofconditionsthatmayaffectthedecision.Combinerowsthatoverlap,forexamp
le,conditionsthataremutuallyexclusive.Thenumberofconditionsbecomesthenumberofrowsinthetop
halfofthedecisiontable.
2.Determinethenumberofpossibleactionsthatcanbetaken.Thisbecomesthenumberofrowsinthelowe
rhalfofthedecisiontable.
3.Determinethenumberofconditionalternativesforeachcondition.Inthesimplestformofdecisiontable
,therewouldbetwoalternatives(YorN)foreachcondition.Inanextendedentrytable,theremaybemanyalternativesforeachcondition.
4.Calculatethemaximumnumberofcolumnsinthedecisiontablebymultiplyingthenumberofalternativ
esforeachcondition.Iftherewerefourconditionsandtwoalternatives(YorN)foreachoftheconditions,t
herewouldbesixteenpossibilities24=16.
Notes prepared by Ms. Peninah J. Limo
Page 22
5.Fillintheconditionalternatives.Startwiththefirstconditionanddividethenumberofcolumnsbythenu
mberofalternativesforthatcondition.Intheforegoingexample,therearesixteencolumnsandtwoalterna
tives(YandN),sosixteendividedbytwoiseight.ThenchooseoneofthealternativesandwriteYinallofthe
eightcolumns.FinishbywritingNintheremainingeightcolumnsasfollows:
Condition1YYYYYYYYNNNNNNNN
Repeatthisforeachconditionusingasubsetofthetableandcontinuethepatternforeachcondition:
Condition1
Condition2
Condition3
Condition4
Y
Y
Y
Y
Y
Y
Y
N
Y
Y
N
Y
Y
Y
N
N
Y
N
Y
Y
Y
N
Y
N
Y
N
N
Y
Y
N
N
N
N
Y
Y
Y
N
Y
Y
N
N
Y
N
Y
N
Y
N
N
N
N
Y
Y
N
N
Y
N
N
N
N
Y
N
N
N
N
6.CompletethetablebyinsertinganXwhererulessuggestcertainactions.
7.Combineruleswhereitisapparentthatanalternativedoesnotmakeadifferenceintheoutcome;forexam
ple:
Condition1
Condition2
Action1
YY
YN
XX
canbeexpressedas:
Condition1
Condition2 -Action1
Y
X
Thedash(-)signifiesthatcondition2canbeeitherYorNandactionwillstillbetaken.
8.Checkthetableforanyimpossiblesituations,contradictions,redundancies.
9.Rearrangetheconditionsandactions(orevenrules)tomakethedecisiontablemoreunderstandable.
Example1
Astorewishestoprogramadecisiononnon-cashreceiptsforgoodsintotheirintelligenttills.
Theconditionstocheckareagreedas:
1.Transactionunder£50
2.Paysbycheckwithcheckcard(guarantee£50)
3.Paysbycreditcard
Thepossibleactionsthatacashiercouldtakeareagreedas:
1.Ringupsale
2.Checkcreditcardfromlocaldatabase
3.Callasupervisor
4.Automaticcheckofcreditcardcompanydatabase
Usingtherulesaboveconstructadecisiontableshowingallpossiblecombinationsofalternatives.
Notes prepared by Ms. Peninah J. Limo
Page 23
Solution
a.Initialdecisiontable
Theconditionrulesareyesorno,thereforethenumberofpossibleconditionrulesare23=8
Under£50
Paysbycheck
Paysbycreditcard
Y
Y
Y
Y
Y
N
Y
N
Y
Y
N
N
N
Y
Y
N
Y
N
N
N
Y
N
N
N
Ringupsale
Checkfromlocaldatabase
CallSupervisor
Checkcreditcarddatabase
Wecanseethatsomeoftheconditionrulesareinvalid(Markedasredandblue),thecustomercannotpayby
checkANDpaybycreditcardornotpaybyeithermethod.Wehavedecidedthatthesecombinationsaremu
tuallyexclusive.
b.Removeinvalidconditions
Thisdecisiontablecanbereducedto4conditionrules.
Under£50
Paysbycheck
Paysbycreditcard
Y
Y
N
Y
N
Y
N
Y
N
N
N
Y
Under£50
Paysbycheck
Paysbycreditcard
Y
Y
N
Y
N
Y
N
Y
N
N
N
Y
Ringupsale
Checkfromlocaldatabase
CallSupervisor
Checkcreditcarddatabase
X
Ringupsale
Checkfromlocaldatabase
CallSupervisor
Checkcreditcarddatabase
c.Indicatetheactions.
X
X
X
d.Checkforcompleteness.
Notes prepared by Ms. Peninah J. Limo
Page 24
Whatifthecustomerhasnotshoppedtheirbefore?Missingsomeasobviousasthismeansreconstructingt
hetable!
Theconditionsarenow:
1.Transactionunder£50
2.Paysbycheckwithcheckcard(guarantee£50)
3.Paysbycreditcard
4.Unknowncustomer
e.Addingnewconditiontothetable
Theactionsremainthesamebutthenumberofconditionrulesincreasesbyamultipleof2.
Under£50
Paysbycheck
Y
Y
Y
Y
Y
N
Y
N
N
Y
N
Y
N
N
N
N
Paysbycreditcard
N
N
Y
Y
N
N
Y
Y
Unknowncustomer
Y
N
Y
N
Y
N
Y
N
Y
Y
N
Y
Y
Y
N
N
Y
N
Y
Y
Y
N
Y
N
N
Y
N
Y
N
Y
N
N
N
N
Y
Y
N
N
Y
N
X
X
X
X
Ringupsale
Checkfromlocaldatabase
CallSupervisor
Checkcreditcarddatabase
f.Indicatetheactions
Under£50
Paysbycheck
Paysbycreditcard
Unknowncustomer
Ringupsale
Checkfromlocaldatabase
CallSupervisor
Checkcreditcarddatabase
X
X
X
X
g.Deletemutuallyexclusiveconditions
Notes prepared by Ms. Peninah J. Limo
Page 25
ThedashinthePaysbycreditrowindicatesthatitdoesnotmatterabouttheconditionrulesinceifacustomer
paysbychecktheywillnotpaybycreditcardandviceversa(mutuallyexclusive).
Under£50
Paysbycheck
Paysbycreditcard
Unknowncustomer
Y
Y
Y
Ringupsale
Checkfromlocaldatabase
CallSupervisor
Checkcreditcarddatabase
Y
Y
N
Y
N
Y
Y
N
N
N
Y
Y
N
Y
N
X
X
N
N
Y
N
N
X
X
N
N
Y
N
N
N
X
X
-
N
X
X
X
X
h.Combinepossiblesituationsaccordingtoactions
Under£50
Paysbycheck
Unknowncustomer
Y
Y
Y
Ringupsale
Checkfromlocaldatabase
Y
Y
N
Y
N
Y
Y
N
N
N
Y
Y
N
Y
N
X
X
X
X
CallSupervisor
X
Checkcreditcarddatabase
X
Combining
Y
Y
Y
+
N
Y
Y
=
Y
Y
Y
N
Y
N
N
Y
+
=
N
Y
Resultanttable
Under£50
Paysbycheck
Unknowncustomer
Ringupsale
Checkfromlocaldatabase
CallSupervisor
Checkcreditcarddatabase
Notes prepared by Ms. Peninah J. Limo
Y
Y
Y
Y
N
N
Y
Y
N
N
N
Y
N
N
N
N
X
X
X
X
X
X
Page 26
j.ReducetablebyafurtherCombinationofidenticalactions
Under£50
Paysbycheck
Unknowncustomer
Y
Y
Y
Y
N
Ringupsale
Checkfromlocaldatabase
CallSupervisor
X
Checkcreditcarddatabase
Checkforfurthercombinationidenticalactions
Y
Y
+
N
Y
N
=
Y
Y
Y
N
Y
Y
+
N
Y
Y
N
N
N
Y
N
N
N
N
X
X
X
X
+
N
Y
N
Y
Y
N
N
Y
X
Cannotmerge
Finalversionofthedecisiontable.
Under£50
Paysbycheck
Unknowncustomer
Ringupsale
Checkfromlocaldatabase
CallSupervisor
Checkcreditcarddatabase
Notes prepared by Ms. Peninah J. Limo
Y
Y
Y
N
N
N
Y
N
N
N
N
X
X
X
X
X
X
Page 27
Example2
Considerabank’sdecisiononwhethertodispensemoneytoacustomerfromacashdispenserinvolvesche
ckingthattheamounttobewithdrawndoesnotexceedthecustomer’saccountbalance.
Solution
Example3
Abankusesthefollowingrulestoclassifynewaccounts.Ifdepositor'sageis21oraboveandifthedepositis
Rs100ormore,classifytheaccounttypeasAIfthedepositorisunder21andthedepositisRs100ormore,cla
ssifyitastypeBIfthedepositoris21oroveranddepositisbelowRs100classifyitasCIfthedepositorisunde
r21anddepositisbelowRs100do-notopenaccount
Solution
Example4
Letustakeasimpleexampleofday-todayproblemwithourInternetconnectivity.Webeginbyidentifyingallproblemsthatcanarisewhilestarti
ngtheinternetandtheirrespectivepossiblesolutions.Welistallpossibleproblemsundercolumnconditio
nsandtheprospective
actionsundercolumnActions.
Notes prepared by Ms. Peninah J. Limo
Page 28
Example5
CompanyXsellsmerchandisetowholesaleandretailoutlets.Wholesalecustomersreceiveatwopercent
discountonallorders.Thecompanyalsoencouragesbothwholesaleandretailcustomerstopaycashonde
liverybyofferingatwopercentdiscountforthismethodofpayment.Anothertwopercentdiscountisgiven
onordersof50ormoreunits.Eachcolumnrepresentsacertaintypeoforder.
Solution
Example6
Considerthefollowingcheck-castingpolicyinasupermarket:
“Ifthecustomerhasavalidstoreidentificationcard,acheckmaybecastedfortheamountofthepurchasep
lus$25.00.Ifacustomerdoesnothaveavalidcreditcardbutcanshowtwootheridentificationsacheckma
ybecashedfortheamountofpurchase,notexceed$20.00.Otherwise,thestoremanagermustbecalledtoa
uthorizetheacceptanceofthecheck.”
Notes prepared by Ms. Peninah J. Limo
Page 29
CONDITIONS
ACTIONS
CheckCashingPolicy
1
Validstoreidentificationcard Y
Purchase>20.00
Twootheridentifications
Allowpurchase+$25.00
X
AllowPurchaseamount
Callstoremanager
2
N
N
Y
3
N
N
N
4
N
Y
X
X
X
Advantages
1. Adecisiontableisconcise,unambiguous;clearlyconveyingthelogicinvolvedhencelessdanger
ofomittingalogicalpossibility.
2. Thetableisaneffectivemeansofcommunicatingwiththecomputerprogrammerbecauseitiseasi
lyunderstood.
3. Easiertodrawandtheyareeasilyunderstood.
4. Producesanautomaticcompactprogram.
5. Theformatofadecisiontableishighlystandardized.
6. Decisiontablescanbecheckedmathematicallyforcompletenessandthatalltestcombinationhav
ebeenconsidered.
7. Theyshowcausesandeffectrelationship,byshowingalternativesidebysidehencealsofacilitati
nganalysisofcombination.
8. Complextablescaneasilybebrokenintosimplertables.
9. Decisiontable’susersneednotknoworunderstandcomputers.
Disadvantages
1. Programmershavebeentrainedtouseflowchartandmightrequireretrainingtousedecisiontable
s.
2. Decisiontabledonotshowsequenceofdecisions.
B. DECISIONTREE
Decisiontreesareusedwhencomplexbranchingoccursinastructureddecisionprocess.Treesarealsouse
fulwhenitisessentialtokeepastringofdecisionsinaparticularsequence.Adecisiontreeisadiagramthat
showsalternativeactionsandconditionswithinhorizontaltreeframework.Thus,itdepictswhichco
nditionstoconsiderfirst,second,andsoon.
Notes prepared by Ms. Peninah J. Limo
Page 30
Decisiontreesdepicttherelationshipofeachconditionandtheirpermissibleactions.Asquarenodeindica
tesanactionandacircleindicatesacondition.Itforcesanalyststoconsiderthesequenceofdecisionsandid
entifiestheactualdecisionthatmustbemade.Likeadecisiontable,itdescribeslogicalrules,showingallof
theactionsthatresultfromvariouscombinationsofconditions.
Adecisiontreeislesscompactthanadecisiontableandinsomecasesmaybelesssuitableforpresentingco
mplexbranchingrelationships.Howeveradecisiontreeprovidesaveryeasilyunderstoodpicturesinceth
ebranchescanbereadtoshowhowallofthemajorandminorlogicalcomponentsgotogether.Likedecisio
ntables,decisiontreescanrepresentbothsystemandcomputerprogram/logicalrelationships.
Thebranchesofdecisiontreeformanetworkthatrepresentsthelogicalrulesbywhichanumberofconditio
nsarerelated.Lowerlevelrelationshipsarenestedwithinhigherlevelrelationships.
EXAMPLE
Allow
Purchase +$25
Valid Store
Identification
card
Purchase
more than $20
No valid store
Identification
card
Notes prepared by Ms. Peninah J. Limo
Call store
Manager
With Other
Identifications
Purchase
$20 or less
Allow store
purchase amount
Page 31
Without Other
identifications
Call Store
Manager
Example2
Considerabookreturnpolicyinlibrary:
“IfaFacultyreturnsabooklate,afineof5%ofthebookrateischarged.IfaStudentreturnsabooklateby3d
ays,fineis10%,else20%ofbookrate.”
Example3
Considerthefollowingpolicyforvehiclerentalcompany:
“Therearetwotypesofclientwhorentvehicles,businessclientsandprivateclients.Privateclientshaveto
payforthevehiclerentalatthetimeofbooking,howeverbusinessclientsaregivencreditterms.Iftheyhave
beenaclientforthreeormoreyears,theyareallowedcreditupto£10,000;thosewhohavebeenclientsforl
essthanthisareallowed£5,000credit”.
Notes prepared by Ms. Peninah J. Limo
Page 32
Example4
ConsiderthesalespromotionpolicyforHolidaysessionisshown
•Preferredcustomerswhoorder$1,000ormoreareentitledtoa5%discount,andanadditional
5%discountiftheyuseourchargecard.
•Preferredcustomerswhodonotorder$1,000ormorewillreceivea$25bonuscoupon.
•Allothercustomerswillreceivea$5bonuscoupon.
Drawatreetodepictthispolicy
Advantages
1.
2.
3.
4.
5.
Easytounderstand.
Mapnicelytoasetofbusinessrules.
Appliedtorealproblems.
Makenopriorassumptionsaboutthedata
Abletoprocessbothnumericalandcategoricaldata.
Disadvantages
1. Outputattributemustbecategorical.
2. Limitedtooneoutputattribute.
Notes prepared by Ms. Peninah J. Limo
Page 33
3. Decisiontreealgorithmsareunstable.
4. Treescreatedfromnumericdatasetcanbecomplex.
C. STRUCTUREDENGLISH
Whentheprocesslogicinvolvesformulaeoriteration,orwhenstructureddecisionsarenotcomplex,anap
propriatetechniqueforanalyzingthedecisionsprocessistheuseofstructuredEnglish.Asthenameimplie
s,structureEnglishisbasedon.
1)Structuredlogic,orinstructionsorganizedintonestedandgroupedproceduresand
2.SimpleEnglishstatementssuchasadd,multiplyandmove.
AwordproblemcanbetransformedintostructuredEnglish,byputtingthedecisionrulesintotheirpropers
equenceandusingtheconventionofIF-THENELSEstatementsthroughout.StructuredEnglishcanbemorecomplexifblocksofinstructionsarenested
withinotherblocksofinstructions.
IF
IF
IF
ELSE
ELSEIF
ENDIF
IF
ELSE
ELSE
ENDIF
IF
ELSE
ENDIF
ENDIF
ELSE
ENDIF
Notes prepared by Ms. Peninah J. Limo
Page 34
WritingStructuredEnglish
1. TowritestructuredEnglish,youmaywanttousethefollowingconventions:
Expressalllogicintermsofoneofthesefourtypes:sequentialstructures,decisionsstructures,cas
estructuresoriterations.
2. UseandcapitalizeacceptedkeywordssuchasIF,THENELSE,DO,DOWHILE,DOUNTIL,an
dPERFORM.
3. Indentblocksofstatementstoshowtheirhierarchy(nesting)clearly.
4. Whenwordsorphraseshavebeendefinedinadatadictionaryunderlinethosewordsorphrasestosi
gnifythattheyhaveaspecialized,reservedmeaning.
5. Becarefulwhenusing“and”and“or”andavoidconfusionwhendistinguishingbetween“greatert
han”and“greaterthanorequalto”andlikerelationships“A”and“B”meansbothAandB,“AorB”
meanseitherAorB,butnotboth.
Example
IFValidstoreidentification
THEN
Allowpurchase+$25
ELSE
IFpurchasemorethan$20
THEN
Callstoremanager
ELSE
IFtwootheridentifications
THEN
Allowamountofpurchase
ELSE
Callstoremanager.
AdvantagesofStructuredEnglish
1.Conciseandprecise,alloweasyreadingwithoutambiguityandmisunderstanding.
2.Languagenotationmaybetailoredtosuituser.
3.Mustexistacross-referencingwithanyDFDandDDentriesthuspermittingthroughverification.
Disadvantages
1.Formalilymaybealienwhenfirstreadorwrite
Notes prepared by Ms. Peninah J. Limo
Page 35
2.AvoidassumingthatanythingwritteninStructuredEnglishiscorrect.
Notes prepared by Ms. Peninah J. Limo
Page 36
0
You can add this document to your study collection(s)
Sign in Available only to authorized usersYou can add this document to your saved list
Sign in Available only to authorized users(For complaints, use another form )