You are on page 1of 20

ISYS 615

MODELING WORKBOOK
SUMMER 2015

Page1of20

ENTITIES AND RELATIONSHIPS

Drawtheentitiesandrelationshipsforeachscenario.

1.
Astudentcantakeseveralcourses;eachcoursemusthaveatleastonestudent.

2.
Aninstructorcanteachseveralcourses,andeachcoursecanbetaughtbymanyinstructors.

3.
Acoursecanhaveseveralsections;eachsectionpertainstoonecourse.

4.
Atextbookisusedinonlyonecourse;acoursecanonlyadoptonetextbook.

Page2of20

CONCEPTUAL MODELING

5.

Createasingleoverallconceptualmodelforthefollowingrealestatecompany.

a.
Thecompanyhasanumberofsalesoffices.Eachofficehasanofficenumberand
location.
b.
Eachsalesofficeisassignedoneormoreemployees.Anemployeemustbeassignedto
onlyonesalesoffice.EachemployeehasanemployeeIDandname.
c.
Foreachsalesoffice,thereisalwaysoneemployeeassignedtomanagethatoffice.An
employeemaymanageonlytheofficetowhichhe/sheisassigned.
d.
Thecompanylistspropertyforsale.EachpropertyhasapropertyIDandlocation.The
propertylocationincludes:addresscity,state,andzip.
e.
Eachunitofpropertymustbelistedwithonlyonesalesoffice.Asalesofficemayhave
anynumberofpropertieslisted(ornoproperties).
f.
Eachunitofpropertyhasoneormoreowners.Eachownerownssomepercentageof
theproperty.EachownerhasanameandanID.Anownercanownmorethanone
property.

Page3of20

6.

7.

TheMarathoner,amonthlymagazine,regularlyreportstheperformanceofprofessional
marathonrunners.Ithasaskedyoutodesignadatabasetorecordthedetailsofallmajor
marathons(e.g.,Boston,London,andParis).Professionalmarathonrunnerscompeteinseveral
raceseachyear.Aracemayhavethousandsofrunners,butonlyabout200orsoare
professionalcompetitors,theonesthatTheMarathonertracks.Foreachrace,themagazine
recordsarunner'stimeandfinishingposition,somepersonaldetailslikename,gender,andage,
andracedetailslikeconditions,numberofcompetitors,anddate.

Ahospitalhasalargenumberofregisteredphysicians.EachphysicianhasanIDandspecialty.
Patientsareadmittedtothehospitalbyphysicians.PatientinformationincludesIDandname.
Anypatientwhoisadmittedmusthaveexactlyoneadmittingphysician.Aphysicianmay
optionallyadmitanynumberofpatients.Onceadmitted,agivenpatientmustbetreatedbyat
leastonephysician.Aparticularphysicianmaytreatanynumberofpatients,ormaynottreat
any.Wheneverapatientistreatedbyaphysician,thehospitalwishestorecordthedetailsof
thetreatmentsuchasdate,time,andresults.

Page4of20

8.

9.

Steveoperatesacinemachainandhasgivenyouthefollowinginformation:Ihavemany
cinemas.Eachcinemacanhavemanytheaters.Moviesareshownthroughoutthedaystarting
at11amandfinishingat1am.Eachmovieisgivena2hourtimeslot.Wenevershowamovie
inmorethanonetheateratatime,butwedoshiftsmoviesamongtheatersbecauseseating
capacityvaries.Iaminterestedinknowinghowmanypeople,classifiedbyadultsandchildren,
attendeachshowingofamovie.Ivaryticketpricesbymovieandtimeslot.

AtSalesRUs,invoicesarewrittenbysalesreps.Eachsalesrepresentativecanwritemany
invoices,buteachinvoiceiswrittenbyasinglesalesrepresentative.Aninvoiceiswrittenfora
singlecustomer;howevereachcustomercanhavemanyinvoices.Aninvoicecanincludemany
detaillineswhichdescribetheproductsboughtbythecustomer.Productsaresuppliedby
differentvendors.

Page5of20

10.

11.

Adatabaseforalocalgarageisneeded.Thedatabasecontainsdataitemsforacustomer
accountnumber,thecustomersname,thecustomersaddress,thecustomersworktelephone
number,thecustomershometelephonenumber,dateofworkdone,automobilemake,
automobilemodel,descriptionofworkdone,partsneededtocompletethework,chargefor
partsneeded,andchargeforlaborperformed.Forwarrantyreasons,datamustbemaintained
inthedatabaseforatleastninetydays;therefore,acustomermayhaveseveralrecordsinthe
databaseatanyparticulartime.Identicalpartshaveonlyonecost,butdifferentpartshave
differentcosts(forexample,alltirescostthesameandallenginescostthesame,butatireand
anenginedonotcostthesame).Acustomermayhavemorethanonecar.

ConsiderasimplecourseenrollmentdatabaseforusebytheDivisionofManagementin
BusinessSchoolatUniversity.Thedepartmentoffersseveralcourses.Atthebeginningofthe
semestertheDivisionDirectorassignsaninstructortoeachcourseandpublishesadirectory
listingcourseandinstructoroffice.Bythe3rdweekthedepartmentproducesacourserollfor
itsownrecords.Attheendofthesemestertheinstructorpostsgradesforeachstudentinthe
courseforthatsemester.

Page6of20

12.

MaryRichardsownsahousepaintingcompany.Shehasdecidedthatsheneedsabetterrecord
keepingsystemthatcanbeusedtoquicklyretrieveinformationabouthercurrentandformer
customers,suchastheirnameandphonenumber.Shealreadyhasdetaileddataaboutthe
individualjobsthathercompanyhasdoneforthesecustomers,suchasthejobnumber,the
beginningandenddatesofthejob,abriefdescriptionofthejob,andtheamountbilled.
However,Marywouldliketobeabletoeasilyrelatethisdatatothejobscustomerandtoher
employeeswhoworkedonthejob.Eachjobhasaforemanandseveralotherpaintersonit.She
alsohasinformationaboutallofheremployees(theirSSN,theirname,theirsalaryandtheir
phonenumber).Sometimesanemployeewillbeapainterononejobandaforemanon
another.Whenacustomercallswithacomplaintabouttheworkbeingdoneontheirhouse
Maryneedstobeabletodeterminewhoisorwastheforemanonthejobandwhoelseworked
onthejob.

Oftentimescustomersarereferredbyothercustomers;Marythinksitwouldbeagoodideato
storedataaboutthereferralsources.WhenacustomerrefersanothercustomerMarysend$10
tothereferringcustomerwithathankyounote.Marydoesntrecognizemultiplereferral
sourcesforanindividualcustomerandshehasnointerestinstoringdataontheselfreferrals.
OfcourseacustomermayrefermanyothercustomerstoMary.

Page7of20

13.

14.

Eachsemester,eachstudentmustbeassignedanadvisorwhocounselsstudentsaboutdegree
requirementsandhelpsstudentsregisterforclass.Eachstudentmustregisterforclasswiththe
helpofanadvisor,butiftheassignedadvisorisnotavailable,thestudentmayregisterwithany
advisor.Wemustkeeptrackofthestudents,assignedadvisors,andnameofadvisorwithwhom
thestudentregisteredinthemostrecentsemester.

(TimeStamping)TheentitytypeSTUDENThasthefollowingattributes:StudentName,Address,
Phone,Age,Activity,and#ofYears.Activityrepresentssomecampusbasedstudentactivity,
while#ofYearsrepresentsthenumberofyearsthestudentshasparticipated.Agivenstudent
mayengageinmorethanoneactivity.

Page8of20

UNARY RELATIONSHIPS

15.

AssumethatatPineValleyFurnitureeachproduct(describedbyproductnumber,description,
andcost)iscomprisedofatleastthreedifferentcomponents(describedbycomponentnumber,
description,andunitofmeasure)andcomponentsareusedtomakeoneormanyproducts.In
addition,assumecomponentsareusedtomakeothercomponents,andthatrawmaterialsare
alsoconsideredcomponents.

Page9of20

ENHANCED ER MODEL

16.

Abankhasthreetypesofaccounts:checking,savings,andloan.Theattributesforeachaccount
areasfollows.Assumethateachbankaccountmustbeamemberofatleastoneofthese
subtypes.

a.
b.
c.

CHECKING:Account_No,Date_Opened,Balance,Service_Charge
SAVINGS:Account_No,Date_Opened,Balance,Interest_Rate
LOAN:Account_No,Date_Opened,Balance,Interest_Rate,Payment

Page10of20

17.

Anonprofitorganizationdependsonanumberofdifferenttypesofpersonsforitssuccessful
operations.Theorganizationmaintainsthefollowinginformationforthesepersons:SSN,name,
address,andphone.Threetypesofpersonsareofgreatestinterest:employees,volunteers,and
donors.Foremployees,theorganizationmaintainsadatehired,andforvolunteers,the
organizationmaintainsalistofskills.Donorsdonateitems.Theycandonateoneormoreitems,
andanitemmaybedonatedbymorethanonedonor(i.e.,ajointgift).Personsmaybelongto
morethanoneofthesegroups,ortononeofthem.

Page11of20

18.

TheAmericankennelassociationistryingtocreateadatabaseofAKCregistereddogspriorto
theirsale.TheyarepreparingaprototypeinIndiana.Foreachpuppy,theywanttoretainthe
puppysnumber(AKCregistrationcode),andthepuppysofficialname.Theyalsoneedtoknow
ifthepuppyisshowqualityorpetquality.Ifshowquality,thentheywanttoretainthedateof
lastshowandtheplacethepuppyfinished.Ifitispetquality,theywanttoknowthedefect
andifthepuppylikeschildren.Eachpuppylivesinakennel.Eachkennelhasacode,aname,
andalocation.Mostkennelshousequiteafewpuppies.Thekennelassociationalsowantsto
keeptrackofthetrickseachdogcando.Atrickcanhaveanidcodeandaname.Somepuppies
cantdoanytricks,whileotherscandomanytricks.Itsalsoimportanttoknowwhenapuppy
learnedacertaintrick.

Page12of20

19.

AlocalKarateshopoffersgroupandprivatelessons.Students(whohavenames,addresses,and
phonenumbers)cantakeeitherkindoflesson,orboth.Grouplessonsareofferedforbeginner,
advanced,andintermediatelevels.Privatelessonsareuniquesinceeachonehasonlyone
studentanditscontentdependsonthestudent.ItsalsoimportantfortheKarateshoptoknow
howlongastudenthasbeenastudent.

Page13of20

OPERATIONAL CONSTRAINTS

20.

21.

Considerthefollowingconstraint:Anemployeemayonlybeassignedtojobsforwhichhe/she
hasbeencertified.
a.
DrawtheEERdiagramsegment
b.
Identifytheconstrainedobjectandconstrainingobject.

Revisitproblem#15,modelingthestatedoperationalconstraint.

Page14of20

RELATIONAL SCHEMA

22.

DrawtherelationalschemaforthefollowingERdiagram.

Page15of20

23.

DrawtherelationalschemaforthefollowingERdiagram.

Page16of20

24.

DrawtherelationalschemaforthefollowingERdiagram.

Page17of20

25.

DrawtherelationalschemaforthefollowingERdiagram.

Page18of20

NORMALIZATION

26.

Youhavebeengivenadatabasecomprisedofthefollowingtables:

Course(DEPT#,DEPARTMENTNAME,COURSE#,CRSTIME,FACULTY#,FACNAME)
Department(DEPT,PHONE,FACULTY#,FACNAME,MAJOR#,MAJORTITLE)
Section(DEPT#,DEPARTMENT,INSTR#,INSTNAME,COURSE,TIME)
Course_Outcome(COURSE#,CRSNAME,STUDENT#,STUNAME,GRADE)
Roster(COURSE#,COURSENAME,INSTR#,INSTRNAME,STUDENT#,STUNAME)

Createarelationalschemaforanewdatabasethatisin3NF.

27.

Youhavebeengivenadatabasecomprisedofthefollowingtables:

Team(PLAYERID,NAME,TEAM,COLOR,COACH,COACHPHONE,COACH/ASST)
Player(PLAYERID,PLAYERNAME,PLAYERADDRESS,TEAM,COACH)

Createarelationalschemaforanewdatabasethatisin3NF.

Page19of20

28.

Uponaskingtoseethedatabasewhereyourclientkeepstrackofallinvoices,youareinstead
presentedwithasinglespreadsheetcalledINVOICE,thatcontainsthefollowingcolumn
headings:

CustomerNumber,OrderNumber,ProductNumber,CustomerName,Address,Order
Date,OrderQuantity,ProductDescription,UnitPrice

Yourinterviewswiththeclienthaveuncoveredthefollowingbusinessrules:

Customerscanplacemultipleordersandeachordercanbeforasingleormultiple
products
Customerscanordermultiplequantitiesofeachproduct

Impressyourclientbycreatingarelationalschemathatmapsoutanewdatabasethatisin3NF.

29.

Normalizethefollowingrelation.

Page20of20

You might also like