Database Application Development Methodology...Assumptions • Business process is well-designed •...

26
Database Application Development Methodology © - an Example Leo Mark & Rocky Dunlap College of Computing Georgia Tech 1 © Copyright: Leo Mark and Rocky Dunlap

Transcript of Database Application Development Methodology...Assumptions • Business process is well-designed •...

DatabaseApplicationDevelopmentMethodology©

- anExample

LeoMark&RockyDunlapCollegeofComputing

GeorgiaTech

1©Copyright:LeoMarkandRockyDunlap

Assumptions• Businessprocessiswell-designed• Documentsareknown• Tasksareknown• Systemboundaryisknown• Onedatabaseschemaunifyingallviewscanbedesigned– difficult:interests,goals,power,politics– problemswiththemethodology?– problemswiththeorganization?– or-ga-ni-za-tion:“anentitycreatedtopursueasharedsetofgoals”

2

TheSoftwareProcess

• Businessprocess(re-)design• Analysis• Specification• Design• Implementation• Testing• Operation• Maintenance

Managem

ent

3

OverviewoftheMethodology- datafirst!!

AnalysisSpecificationDesignImplementation

1

2

3

4

InformationFlow

Diagram1

2b 4b

2a 3a 4a

Tasks

ERDiagram

RelationalSchema

AbstractCodew/SQL

MySQLRelationalPlatform

PHPCodew/SQL

4

SQL

ExampleProjectDescription

• Theprojectdescriptionrepresentsthecustomer:– Businessprocess– Documents– Tasks– Systemboundary

5

GTOnline isasimplesocialnetworkingapplicationwithasetofbasicfeaturessimilartothosefoundonsiteslikeFacebook andLinkedIn.GTOnline usersmaintainabasicprofileincludingtheirname,birthdate,hometown,currentcity,schoolstheyhaveattended,andplacesofemployment.Userscanconnecttootherusersbysendingfriendrequests.Ifarequestisaccepted,thenafriendshiplinkisestablishedbetweenthetwousers.Inadditiontomaintainingbasicprofileinformation,userscanlettheirfriendsknowwhattheyarecurrentlydoingbywritingstatusupdates.Userscanalsocommentontheirfriends’statusupdatesaswellastheirownstatusupdates.TheGTOnline applicationalsosupportsadministrativeuserswhomaintainthelistofschoolsandplacesofemployment.

GTOnline Lite Social Networkingfor Networking Socialites

6

GTOnline isasimplesocialnetworkingapplicationwithasetofbasicfeaturessimilartothosefoundonsiteslikeFacebook andLinkedIn.GTOnline usersmaintainabasicprofileincludingtheirname,birthdate,hometown,currentcity,schoolstheyhaveattended,andplacesofemployment.Userscanconnecttootherusersbysendingfriendrequests.Ifarequestisaccepted,thenafriendshiplinkisestablishedbetweenthetwousers.Inadditiontomaintainingbasicprofileinformation,userscanlettheirfriendsknowwhattheyarecurrentlydoingbywritingstatusupdates.Userscanalsocommentontheirfriends’statusupdatesaswellastheirownstatusupdates.TheGTOnline applicationalsosupportsadministrativeuserswhomaintainthelistofschoolsandplacesofemployment.

GTOnline Lite Social Networkingfor Networking Socialites

7

GTOnlineLogin

Email

Password

LoginRegister

NewusersclickheretocreateanewGTOnlineaccount

GTOnline Lite Social Networkingfor Networking Socialites

8

EditGTOnlineProfileforMichaelBluth

Male

1968-06-20

GeorgiaInstituteofTechnology(College/University)

1990

DunderMifflin

AssistanttotheRegionalManager

WilliamMcKinley(HighSchool)

1986

Sex

Birthdate

CurrentCity

Hometown

MichaelBluth

School

Education AddAnotherSchool

YearGraduated

Professional

DeletethisSchool

AddAnotherJob

Employer

JobTitle

DeletethisJob

Save

Cancel

AddsanotherboxontheuserinterfacewithSchoolandYearGraduated.

AddsanotherboxtotheuserinterfacewithEmployerandJobTitle.

Maybeleftblank

Listsavailableschoolsandtheirtype

School

YearGraduated

DeletethisSchool

Interests TennisWatchingInceptionOverandOverAgainSeinfeld

Add

Addsanewinterestandrefreshesthepage

Save

Save

Save

GTOnlineNewUserRegistration

Bluth

Michael

Email

Password

ConfirmPassword

RegisterCancel

Returnstotheloginscreen

LastName

FirstName

Allfieldsarerequired

GTOnline Lite Social Networkingfor Networking Socialites

ViewGTOnlineProfileforMichaelBluth

Sex

Birthdate

CurrentCity

Hometown

MichaelBluth

School

Education

YearGraduated

Professional

Employer

JobTitle

Male

Scranton,PA

1968-06-20

BeveryHills,CA

GeorgiaInstituteofTechnology(College/University)

1990

DunderMifflin

AssistanttotheRegionalManager

SchoolName

YearGraduated

WilliamMcKinley(HighSchool)

1986

ViewStatusUpdatesViewFriends

LogOut

SearchforFriends,ViewPendingRequests,andEditProfileareonlyvisibleifthisistheprofileofthecurrentlyloggedinuser

OnlyshowYearGraduatediffieldisnotnull

SearchforFriendsViewPendingRequests

EditProfile

Interests TennisWatchingInceptionOverandOverAgainSeinfeld

SearchforFriends

ScrantonHometown Search

Email

Name

SearchforFriends

SearchResults

BobVance Scranton,PAPhyllisLapin-Vance Scranton,PA

Name Hometown

AfterclickingSearch,anyrelevantresultsappearhere(oronanewpage)

ClickingonanameshowstheAddFrienddialogbox

Existingfriendsshouldnotbeshowninthelist

Close

ThesethreefieldsareORedtogether

BacktoProfile

RequestNewFriendforMichaelBluth

Co-worker

Hometown

SendFriendRequest

Theuserprovidesanyvaluefortherelationship

Name

RequestNewFriendforMichaelBluth

PhyllisLapin-Vance

Scranton,PA

Relationship

Cancel

Friendisnotimmediatelyadded.Instead,arequestissenttotheotheruser.

9

GTOnlineFriendsList

FriendsofMichaelBluth

Name Relationship ConnectedSince

AngelaMartin Co-worker August17,2009DwightSchrute Co-worker July9,2009GeorgeBluth,Sr. Father March10,2008GeorgeMichaelBluth Son March10,2008JimHalpert Co-worker July9,2009LindseyFunke Sister November22,2009MichaelScott Boss April1,2009PamBeasley Co-worker June14,2009TobiasFunke Brother-in-law November23,2009

Clickingonanameshowsthatfriend’sprofile

Clickingontheheaderre-sortsthelistoffriends BacktoProfile

Returntothisuser’sprofile

10

PendingFriendRequestsforMichaelBluth

Accept

Thefollowingpeoplehaverequestedtobefriendswithyou

SueSylvester Lima,OH FormerCoach

WillSchuester Lima,OH FormerDirector

Name Hometown Relationship

ClickingAcceptaddstheuserasafriendandrecordsthecurrentdate

ClickingRejectcancelstherequest

Reject

Accept Reject

Close

Itispossibletoclosethewindowevenwithpendingrequests.Thoserequestsshouldstillappearthenexttimetheuserviewsthispage.

Youhaverequestedtobefriendswiththesepeople

PhyllisLapin-Vance Scranton,PA Co-worker

Name Hometown Relationship

Clickingonauser’snameshowshisorherprofile

Cancel

Cancelarequestbeforeitisacceptedorrejected

Thesesnippets oftaskrequirements aretakenfromacomprehensive project description andarejustpartofwhatisusedtodesigntheIFDDiagram.

11

12

Analysis– InformationFlowDiagram

• informationflow;not controlflow

• never connecttwodocuments

• never connecttwotasks

D1

T1

T2

T3

Database

D2

D6

D3

D5

D4

T4

documentname

taskname

13

FriendSearchandResults

Friendrequest

UsedocumentandtasknamesfromtheprojectdescriptionintheIFD!

IFD

14

• Everythinginthedatabasemustcomefromsomewhere

• Everythingontheinputdocumentsmustgosomewhere

• Everythinginthedatabasemustbeusedforsomething• Everythingontheoutputdocumentsmustcomefromsomewhere

D1

T1T2?

D2 D3

Whatgoesintothedatabase?Whatcomesoutofthedatabase?

?

15

Specification

• EERDiagram• DataFormats• Constraints• TaskDecomposition

16

GTOnlineNewUserRegistration

Bluth

Michael

Email

Password

ConfirmPassword

RegisterCancel

Returnstotheloginscreen

LastName

FirstName

Allfieldsarerequired

GTOnline Lite Social Networkingfor Networking Socialites

GTOnlineLogin

Email

Password

LoginRegister

NewusersclickheretocreateanewGTOnlineaccount

GTOnline Lite Social Networkingfor Networking Socialites

[Requirement]:…..AllusersareuniquelyidentifiedbyhisorherEmailAddress.Providing avalidEmailAddress andPassword combinationwilllogtheuserintothesystem…..

[Question]:ShouldNamebeacompositeattribute?Well,youdecide, sortof…..

Name

Thesesnippets oftaskrequirements aretakenfromacomprehensiveproject description andarejustpartofwhatisusedtodesigntheERDiagram.

17

User

Email Password

NameFirstName

LastName

UseattributenamesfromthedocumentsintheEERDiagram!

18

EditGTOnlineProfileforMichaelBluth

Male

1968-06-20

GeorgiaInstituteofTechnology(College/University)

1990

DunderMifflin

AssistanttotheRegionalManager

WilliamMcKinley(HighSchool)

1986

Sex

Birthdate

CurrentCity

Hometown

MichaelBluth

School

Education AddAnotherSchool

YearGraduated

Professional

DeletethisSchool

AddAnotherJob

Employer

JobTitle

DeletethisJob

Save

Cancel

AddsanotherboxontheuserinterfacewithSchoolandYearGraduated.

AddsanotherboxtotheuserinterfacewithEmployerandJobTitle.

Maybeleftblank

Listsavailableschoolsandtheirtype

School

YearGraduated

DeletethisSchool

Interests TennisWatchingInceptionOverandOverAgainSeinfeld

Add

Addsanewinterestandrefreshesthepage

Save

Save

Save

RegularUser

Interests

CurrentCity

HomeTown

Sex

Birthdate

[Requirements]:…..AllGTOnlineusers(exceptadministrativeusers)haveaprofilecontainingbasicinformation aboutthem.…..

[Requirements]:…..Administrativeusershavesomeofthesameinformationasregularusers(EmailAddress,Password,FirstName,andLastName)…..,butdonothaveafullprofileandcannotrequestfriends, etc.Ausermustbeeitheranadministratororaregularuser,butneverboth.GTOnline alsotracksthelastdateandtimethatanadminuserloggedintothesystem…..

19

RegularUser

User

AdminUser

d

Email

LastLogin

Password

NameFirstName

LastNameInterests

CurrentCity

HomeTown

Sex

Birthdate

[Requirements]:…AlistofSchools,fromwhichtheusercanselect,ismaintainedinthesystem.AssumethatallSchoolNameswillbeunique.AusercanhaveanynumberofschoolsassociatedwithhimorherandcanprovideaGraduationDate foreachschool.…..Itispossible thatthesameschoolwillappearmultiple timeswithdifferentgraduationdates.

20

EditGTOnlineProfileforMichaelBluth

Male

1968-06-20

GeorgiaInstituteofTechnology(College/University)

1990

DunderMifflin

AssistanttotheRegionalManager

WilliamMcKinley(HighSchool)

1986

Sex

Birthdate

CurrentCity

Hometown

MichaelBluth

School

Education AddAnotherSchool

YearGraduated

Professional

DeletethisSchool

AddAnotherJob

Employer

JobTitle

DeletethisJob

Save

Cancel

AddsanotherboxontheuserinterfacewithSchoolandYearGraduated.

AddsanotherboxtotheuserinterfacewithEmployerandJobTitle.

Maybeleftblank

Listsavailableschoolsandtheirtype

School

YearGraduated

DeletethisSchool

Interests TennisWatchingInceptionOverandOverAgainSeinfeld

Add

Addsanewinterestandrefreshesthepage

Save

Save

Save

M

NRegularUser

School

YearGraduated

SchoolName

GTOnlineAdministrator–ManageSchools

College/University

Schools

GeorgiaInstituteofTechnology College/UniversityWilliamMcKinley HighSchoolUniversityofGeorgia MiddleSchoolBuckwheatElementary ElementarySchool

Add

BacktoMenu

Schooltypesinclude:College/University,HighSchool,MiddleSchool,andElementarySchool

Addsanewschooltothelistandrefreshesthepage

[Requirements]:…..EachschoolmusthaveaSchoolType.Therearefourpossibletypes:College/University,HighSchool,MiddleSchool,andElementarySchool.…..Itshouldbepossibleforthedatabaseadministratortoaddnewschooltypesfrombehind thescenes.

21

M

M

N

N

RegularUser

School

SchoolType

YearGraduated

TypeName

SchoolName

[Requirements]:…..Administratorsareresponsible formanaging thelistofEmployers.AssumethatallEmployershaveauniqueName.

GTOnlineAdministrator–ManageEmployers

Employers

DunderMifflinDepotofOfficeSuppliesPaper,Inc.CityofAtlantaCoca-ColaDeltaDatabaseDesigners,Inc.

Add

BacktoMenu

Addsanewemployertothelistandrefreshesthepage

[Requirements]:…..TheJobTitle fieldisnotmanagedbytheadministratorandcanbeanyvalueprovidedbytheuser.AprofilecancontainmultipleEmployers andthesameEmployermayevenappearmultiple timesaslongastheJobTitle isdifferent ineachcase.

22

M

N

RegularUser

Employer

JobTitle

EmployerName

RequestNewFriendforMichaelBluth

Co-worker

Hometown

SendFriendRequest

Theuserprovidesanyvaluefortherelationship

Name

RequestNewFriendforMichaelBluth

PhyllisLapin-Vance

Scranton,PA

Relationship

Cancel

Friendisnotimmediatelyadded.Instead,arequestissenttotheotheruser.

PendingFriendRequestsforMichaelBluth

Accept

Thefollowingpeoplehaverequestedtobefriendswithyou

SueSylvester Lima,OH FormerCoach

WillSchuester Lima,OH FormerDirector

Name Hometown Relationship

ClickingAcceptaddstheuserasafriendandrecordsthecurrentdate

ClickingRejectcancelstherequest

Reject

Accept Reject

Close

Itispossibletoclosethewindowevenwithpendingrequests.Thoserequestsshouldstillappearthenexttimetheuserviewsthispage.

Youhaverequestedtobefriendswiththesepeople

PhyllisLapin-Vance Scranton,PA Co-worker

Name Hometown Relationship

Clickingonauser’snameshowshisorherprofile

Cancel

Cancelarequestbeforeitisacceptedorrejected

[Requirements]:…..friendship isnotalwaysreciprocal…..justbecauseEmilyisfriendswithSarah,thisdoesnotimplythatSarahisfriendswithEmily.…..

…..theDateConnected fieldissetwhenthefriend requestisaccepted,not whentherequestisoriginally sent.

23

RegularUser

Friendship

1

NN

1

Relationship

DateConnected

request

accept

M

M

N

N

M

N

RegularUser

User

AdminUser

School Employer

d

SchoolType

JobTitleYearGraduated

TypeName

Email

EmployerName

SchoolName

LastLogin

Password

NameFirstName

LastName

Friendship

1

NN

1

Interests

CurrentCity

HomeTown

Sex

Birthdate

Relationship

DateConnected

request

accept

EERDiagram

24

GTOnlineNewUserRegistration

Bluth

Michael

Email

Password

ConfirmPassword

RegisterCancel

Returnstotheloginscreen

LastName

FirstName

Allfieldsarerequired

GTOnline Lite Social Networkingfor Networking Socialites

25

RegularUser

User

d

Email Password

NameFirstName

LastNameInterests

CurrentCity

HomeTown

Sex

Birthdate

DataFormats- beg,steal,borrow

User:• Email:max36chars.Example: [email protected]• Password:max20chars.Example:qwerty• Name:FirstName:max25chars;Last:max40chars• Addresses(whenneeded)areveryvery difficult.

E.g.,look atthe208pageguidelineathttp://pe.usps.com/cpim/ftp/pubs/pub28/pub28.pdf

RegularUser:• Birthdate:Date:'YYYY-MM-DD'• Sex:{M,F}• CurrentCity,HomeTown:max 20chars,each• Interests:multi-valuewith16chars,each

Constraints

Examples:• DateConnected isNULLuntilrequestisaccepted.• CannotbeFriendwithyourself.• CanonlycommentonStatusofFriends.

Ignore:• Dataformattingconstraints• ConstraintsthatcanbeexpressedintheEERDiagram

26