Sunteți pe pagina 1din 2

ConstructEntityRelationshipDiagram(ERD)

Exercice1:AdatabaseistobemadetostoreinformationaboutacatalogueofCDs.Information
tobestoredabouteachCDincludestheirtitles,prices,genre,andalistoftracks.EachCDwillalsohave
anartist,andeachartistmayproduceseveralCDs.Trackswillhaveatitleandarunningtime(in
seconds).Artistshavenamesassociatedwiththemanditshouldbepossibletosearchthedatabaseby
artistnames.Finally,inordertosearchthecataloguebytitle,eachCDwillhaveanumberofkeywords,
whicharethewordsinthetitleoftheCD.
DesignanERDforthisapplication.Noteanyunspecifiedrequirements,andmakeappropriate
assumptionstomakethespecificationcomplete.

Exercise2:ACountryBusCompanyownsanumberofbusses.Eachbusisallocatedtoa
particularroute,althoughsomeroutesmayhaveseveralbusses.Eachroutepassesthroughanumberof
towns.Oneormoredriversareallocatedtoeachstageofaroute,whichcorrespondstoajourney
throughsomeorallofthetownsonaroute.Someofthetownshaveagaragewherebussesarekept
andeachofthebussesareidentifiedbytheregistrationnumberandcancarrydifferentnumbersof
passengers,sincethevehiclesvaryinsizeandcanbesingleordoubledecked.Eachrouteisidentifiedby
aroutenumberandinformationisavailableontheaveragenumberofpassengerscarriedperdayfor
eachroute.Drivershaveanemployeenumber,name,address,andsometimesatelephonenumber.
(?)DesignanERDforthisapplication.Noteanyunspecifiedrequirements,andmakeappropriate
assumptionstomakethespecificationcomplete.

Exercise3:DesignanERschemaforkeepingtrackofinformationaboutvotetakenintheU.S.
HouseofRepresentativesduringthecurrenttwoyearcongressionalsession.Thedatabaseneedsto
keeptrackofeachU.S.STATEsName(e.g.,Texas,NewYork,Connecticut)andincludetheRegionof
thestate(whosedomainis{Northeast,Midwest,Southeast,Southwest,West}).Each
CONGRESS_PERSONintheHouseofRepresentativesisdescribedbyhisorherName,plustheDistrict

represented,theStart_datewhenthecongresspersonwasfirstelected,andthepoliticalPartytowhich
heorshebelongs(whosedomainisRepublican,Democrat,Independent,Other)).Thedatabase
keepstrackofeachBILL(i.e.,proposedlaw),includingtheBill_name,theDate_of_voteonthebill,
whetherthebillPassesed_or_failed(whosedomainis{Yes,No},andtheSponsor(the
congressperson(s)whosponsoredthatis,proposedthebill).Thedatabasekeepstrackofhoweach
congresspersonvotedoneachbill(domainofVoteattributeis{Yes,No,Abstain,Absent}).
(?)DesignanERDforthisapplication.Noteanyunspecifiedrequirements,andmakeappropriate
assumptionstomakethespecificationcomplete.

Exercise4:Considerthefollowingsetofrequirementsforauniversitydatabasethatisusedto
keeptrackofstudents'transcripts.
(a)Theuniversitykeepstrackofeachstudent'sname,studentnumber,socialsecuritynumber,current
addressandphone,permanentaddressandphone,birthdate,sex,class(freshman,sophomore,...,
graduate),majordepartment,minordepartment(ifany),anddegreeprogram(B.A.,B.S.,...,Ph.D.).
Someuserapplicationsneedtorefertothecity,state,andzipofthestudent'spermanentaddress,and
tothestudent'slastname.Bothsocialsecuritynumberandstudentnumberhaveuniquevaluesfor
eachstudent.
(b)Eachdepartmentisdescribedbyaname,departmentcode,officenumber,officephone,andcollege.
Bothnameandcodehaveuniquevaluesforeachdepartment.
(c)Eachcoursehasacoursename,description,coursenumber,numberofsemesterhours,level,and
offeringdepartment.Thevalueofcoursenumberisuniqueforeachcourse.
(d)Eachsectionhasaninstructor,semester,year,course,andsectionnumber.Thesectionnumber
distinguishesdifferentsectionsofthesamecoursethataretaughtduringthesamesemester/year;its
valuesare1,2,3,...;uptothenumberofsectionstaughtduringeachsemester.
(e)Agradereporthasastudent,section,lettergrade,andnumericgrade(0,1,2,3,4forF,D,C,B,A,
respectively).
(?)DesignanERDforthisapplication.Noteanyunspecifiedrequirements,andmakeappropriate
assumptionstomakethespecificationcomplete.

S-ar putea să vă placă și