Sie sind auf Seite 1von 8

1.

Preamble

LastModified:May8,2014
TeamMembers:FrankDinoff,SeanEsterkin,JohnHinkel,ColinMurphy
ProjectName:Khan

Summary:
Theprojectideawehadwastocreatearegistrationsystemforagamingconvention.Things
thatweshouldbeableimplementinclude:whatgamesarebeingplayedwho'splayingthem,
who'srunningthem,wherethegamesarebeingplayed,andthecosttoparticipate.Something
alongtheselines.

Wheretheideacamefrom:Gamingconventionshaveeventregistrationssystemsthatallow
peopleattendingtheconventiontoregistergamestobeplayedandsignupforgames.Example
gamingconventionswouldbeGencon(http://www.gencon.com)orSimcon
(sa.rochester.edu/simcon/blog)

Masterdirectoryonbetaweb:~/sesterki/csc296-khan

2.DomainDescription

Everyyearlotsofgamingconventionsarerun.Theseconventionscanhavehundredsofpeople
showinguptorunandplaygames.Thesystemallowpeoplerunningthegamestoputup
descriptionsofthegame,whentheywanttoplaythegame,andhowmanypeoplecanplay.The
systemwillalsoallowspeopleplayingthegamesneedtosignupforthegames.Iftoomany
peoplesignup,thesystemhastodealwithwaitlistingpeople.Aftertheinitialsignupperiodis
over,eachgamecanbeassignedatablebasedoffofthetimesandnumberofpeople.Atthe
convention,peoplecanthensignintosaythattheyarrivedandarereadytoplaythegame.If
therearestillopenings,peoplecanusethesystemtojoingamesthathavelessthanthenumber
ofpeopleinvolved.

3.UseCases

Assumethatyouwereaparticipantinagamingconventionwhohasjustarrivedatthe
conventioncenter.Thereareafewthingsthatyouwouldimmediatelyuseoursystemfor:
1. seeingthegamesthatareavailabletobeplayedthroughnavigatingsomesortofweb
interface.
2. usingthatsameinterface,youwouldthenreserveaspotataparticulargamingtableata
particulartime
3. oncetheregistrationperiodhasclosed,andthestaffhaveassignedtablelocationstothe
game,youwouldlogbackontothesystemandchecktoseewhereyouweresupposed
togo.
Theuserwouldexecutetheprocessofusingoursystemintheexactorderdescribedabove.


Now,assumeyouareastaffmemberattheconvention.Youwouldthenneedtofollowthe
followingstepsintheordertheyareshown:
1. youwouldsetupadescriptionforeachgame(rulesofplay,etc)(insertgamesintothe
database)
2. youwouldthenaddthetimeitwouldbeplayed(updatetimes)
3. afterthat,youwouldaddhowmanypeoplecanplayforthatsystem.

Staffmemberswouldbeabletoaddnewspostsforeveryoneattendingtheconventiontosee.

4.SampleQueriesEnglish

1. WhoissignedupfortheeventTinbuildingBandroomnumberRstartingattimeS?
2. Givethenameanddescriptionforallgamesbeingbeingrunatthisconvention.
3. WherearetheMagicgamesbeingplayed?
4. WhatisthenameandemailforthepersonrunningeventTinbuildingBandroom
numberRstartingattimeS?

5.ERDiagram

6.Schema

1. Games(gid,name,description,min_players,max_players,min_time,max_time)
2. Locations(room_number,building,name,max_people,max_games)
3. People(pid,name,email,gender,on_mailing_list,staff,uname,password)
4. Events(event_id,event_title,start_time,room_number,building,cost,player_limit,
run_by,game_name)
5. Signed_up(event_title,start_time,room_number,building,pid,signup_time)
6. Phone(pid,phone_number,type_of_phone)
7. News_posts(postid,timestamp,title,content,pid)

6.1Views
Theseviewsarekeptaroundforbackwardscompatibilitysincetheywereoriginally
relation.Howevertheycanfullydeterminedfromotherrelations.

1. Being_played(event_title,start_time,room_number,building,game_name)
2. Posted_by(pid,postid)

7.SampleQueries

1. WhoissignedupfortheeventTinbuildingBandroomnumberRstartingattimeS?

2. Givethenameanddescriptionforallgamesbeingbeingrunatthisconvention.

3. WherearetheMagicgamesbeingplayed?

4. WhatisthenameandemailforthepersonrunningeventTinbuildingBandroom
numberRstartingattimeS?

8.FunctionalDependencies1
EventsRelation
event_idbuilding
event_idroom_number
event_idevent_title
event_idstart_time
building,room_number,event_title,start_timecost
building,room_number,event_title,start_timeplayer_limit
building,room_number,event_title,start_timerun_by
building,room_number,event_title,start_timeevent_id
building,room_number,event_title,start_timegame_name

GameRelation
gidname
namemin_run_time
namemax_run_time
namemax_players
namemin_players
namedescription
namegid

LocationsRelation
buildingroom_numbermax_games
buildingroom_numbermax_people
buildingroom_numbername

PeopleRelation
pidname
pidemail
pidgender
pidon_mail_list
pidstaff
piduname
pidpassword

PhoneRelation
pidphone_numbertype_of_phone

NewsPosts
postidtimestamp
postidcontent
postidtitle
postidpid

Signed_up
event_titlestart_timeroom_numberbuildingpidsignup_time

9.ProofofFourthNormalForm
Accordingtothetextbookonpage111,Ifarelationisin4NF,theneverynontrivialMVDisreally
anFDwithasuperkeyontheleft.

Wecouldntfinda4NFviolationsinceallMVDsaretrivial.

ProofthateachrelationisinBCNF.TherelationsNewsPosts,PhoneRelation,PeopleRelation,
LocationsandGameRelationareinBCNFbecauseallfunctionaldependenciesinthese
relationshavekeysonthelefthandsideandallkeysaresuperkeysthereforetheyareinBCNF.

ToprovethatEventsrelationisinBCNF,wenotethatevent_idistheonlykey.Howeversince
thesecondfunctionaldependencycanderiveevent_idbothfunctionaldependencieshave
superkeysonthelefthandsidesoeventsisinBCNF.

10.RelationalSchema2
OurrelationalschemaisinFourthNormalForm,sothisstepisnotnecessary.

11.FunctionalDependencies2
OurrelationalschemaisinFourthNormalForm,sothisstepisnotnecessary.

12.ProofofNormalForm2
OurrelationalschemaisinFourthNormalForm,sothisstepisnotnecessary.

13.SampleQueriesRelationalalgebra2
OurrelationalschemaisinFourthNormalForm,sothisstepisnotnecessary.

14.DatabaseImplementationStatus

Thenumberofrowsineachtableisasfollows(achievedfromthefollowingquery):
mysql> SELECT Table_name, table_rows FROM
INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='sesterki'
AND table_rows IS NOT NULL;

+------------+------------+
| Table_name | table_rows |
+------------+------------+
| Events
|
7|
| Games
|
10 |
| Locations |
11 |
| News_posts |
4|
| People
|
14 |
| Phone
|
12 |
| Signed_up |
19 |
+------------+------------+
7 rows in set (0.15 sec)

TheURLsofthethreefilesrequestedforthissectionareasfollows:
http://betaweb.csug.rochester.edu/~sesterki/makekhandb.sql
http://betaweb.csug.rochester.edu/~sesterki/testquerieskhan.sql
http://betaweb.csug.rochester.edu/~sesterki/testqueriesoutkahn.txt

15.DatabaseAbstractionLayer1
Wehavecreateddataabstractionlayerstoviewallentitysetsinthedatabase.

16.WebSiteDBQueryStatus1
Thewebsiteislocatedathttp://betaweb.csug.rochester.edu/~sesterki/index.php

Oursamplequerywebpagewillbeusedtofindoutwhichpeoplearesignedupfora
specificevent.InthiscasetheeventwasMythPremierQualifierwithastarttimeof
201449at15:00:00TheplaceisHutchinson141.Thequeryused

Thequerywebpagecontainsadescriptionofwhatthequerydoes,thequeryitself,and
theresultsfromthequery.Thequerypageislocatedat
http://betaweb.csug.rochester.edu/~sesterki/query.php.

17.DataAbstractionLayer2
Wehavecreateddataabstractionlayersforourremainingentityrelations.

18.WebSiteDBQueryStatus2
OurSECOND,substantiallydifferentwebpagethatperformsacomplexqueryisfoundatthe
followinglink:
http://betaweb.csug.rochester.edu/~sesterki/eventpage.php?title=Morels%20Morals&time
stamp=20140419%2014:00:00&room=141&building=Hutchinson
Thepurposeofthiswebpageistoallowausertoviewallinformationabouttheeventandsign

upfortheeventthattheyhaveselected.Thewebpageusesacomplexquerytopullall
informationaboutthatgameanddisplayittotheuserbeforetheysignup.

OurTHIRD,substantiallydifferentwebpagethatacceptsasearchstringfromtheuserisfound
atourEventSearchPage:http://betaweb.csug.rochester.edu/~sesterki/eventsearch.php.The
usercaneitherentersomethingintothesearchpageornot,andthentheusercanclickSearch
forEvent.Iftheuserentersnothing,itsearchesforallevents.Iftheuserentersastring,itwill
searchforthatstring.

19.WebSiteDBModificationStatus

OurFOURTHpagethatallowstheusertoinsertnewinformationintothesystemisfoundhere:
http://betaweb.csug.rochester.edu/~sesterki/signup.php.Thisallowsnewuserstosignupfor
anaccountonthesystem.Eachtimeausersignsup,itinsertsalltheirinformationintothe
Peopletable.

OurFIFTHpagethatallowstheusertoupdateexistinginformationinthesystemisfoundhere:
http://betaweb.csug.rochester.edu/~sesterki/admin.php.Thispageallowsadministratorsto
updatewhatisstoredinthesystem,aswellasaddnewthingstothesystem.Youwillneedto
logintopagewiththeexampleusernameofkoomenandpasswordofkoomen.Youwillneedto
usethelinkagaintoviewthepage.Onlydesignatedstaffmembersareallowedtoaccessthe
Adminpage.

20.AdditionalDatabaseCapabilities

Allidnumbersareautoincrementsotheyshouldalwaysbeunique.Thisallowsforeasyaccess
toasinglerowafterwehavefoundtherowsinceallidnumbersareindexesontheirrespective
tables.

EventshasforeignkeysonLocationsforbuildingandroomnumber.Thismakesitconsistentif
thewecantheroomnumberorbuildinginLocations.Eventsalsohasforeignkeyson
game_namewhichcorrespondstoGame(name)andrun_byreferencesPerson(username)

Signed_uphasforeignkeyswhichreferencetheeventskeyandandpersonpid.

PhoneandNewsPostsalsohaveforeignkeyswhichreferencepersonpid.

Alloftheseforeignkeyskeepthedatabaseconsistentifanythingchanges.Wecanasimple
updatestatementinsteadaverycomplexone.

TherearealsotwotriggerswhichmakesureTwoeventsdonotoccurinthesameroomatthe
sametime.ThisshouldhavebeendonewithaCHECKconstrainthoweverdoesnotsupport
them.Thesetriggersshouldbemodifiedinthefuturetocheckroomcapacityinsteadofjust

sayingeachcanonlysupportonegame.Wearestoringthisinformationindatabasealready.

21.AdditionalWebSiteCapabilities
Thewebsitehasaworkingheaderthatloadsthefaviconforthewholewebsite,aswellas
providesatitleandmenubar.ThewebsiteusesAJAXpoststosendinformationfromthefront
endtothephpfiles.Thewebsitealsostoresusersanduserrolesinthecookietoensurethat
onlystaffmembershavepermissionstoeditgames,events,orpeople.

22.ProjectDemo
Duringtheprojectdemo,wewillpresentslidesthatshowourdatabasedesign(E/Rdiagram)
anduniqueexamplesofhowwedealtwithdataintegrity.Wewillalsodemonstratethe
capabilitiesofourwebsite.TheURLforourpresentationisasfollows:
http://betaweb.csug.rochester.edu/~sesterki/296_presentation.pdf

Das könnte Ihnen auch gefallen