cs6660 final exam name

Post on 11-Jan-2022

2 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

CS6660 Final Exam Name:

1

1.DrawanERDforthefollowingscenario(showcardinality).Translatethediagramintotables:Asales-personmaymanagemanyothersales-people.Asales-personismanagedbyonlyonesales-people.Asales-personcanbeanagentformanycustomers.Acustomerismanagedbyonesales-person.Acustomercanplacemanyorders.Onecustomercanplaceeachorder.Anorderlistsmanyinventoryitems.Aninventoryitemmaybelistedonmanyorders.Aninventoryitemisassembledfrommanyparts.Apartmaybeassembledintomanyinventoryitems.Manyemployeesassembleaninventoryitemfrommanyparts.Asuppliersuppliesmanyparts.Manysuppliersmaysupplythesamepart.

Salesperson(SP_ID(PK),SP_ID(FK)–managerIDfortherecursiverelationship)Customer(Customer_ID(PK),SP-ID(FK),…)Order(Order_ID(PK),Customer_ID(FK),…)Lists(Order_ID(FK),Product_ID(FK),…)Product(Product_ID(PK)…)Assembles1(Product_ID(FK),Employee_ID(FK),…)Assembles2(Product_ID(FK),Part_ID(FK),…)Part(Part_ID(PK),…)Supplier(Supplier_ID(PK),…)Supplies(Part_ID(FK),Supplier_ID(FK),…)Employee(Employee_ID(PK),…)

CS6660 Final Exam Name:

2

2.DrawanERDforthefollowingscenario(showcardinality).Translatethediagramintotables:Theuniversityhasseveralacademicdepartments.Eachdepartmenthasauniquenameandastreetaddress(number,streetname)associatedwithit.Thedepartmentsoffercourseswithdistinctnames,eachofwhichistaughtbyasingleprofessorandoneormoreTAs.ATAcanonlybeassignedtoonecourse.Thecourseisofferedonceaweekatafixedtime.Studentsbelongtoasingledepartmentbutcanregisterforcoursesofferedbyanydepartment.Whenastudenttakesacourse,he/sheisassignedtoaTAforhelp(i.e.,eachTAofthecoursehelpsdifferentsetofstudents).Eachperson(professor,student,TA)hasanameandauniqueSSN.ProfessorandTAalsoearnasalary.Finally,theuniversityalsowantstokeeptrackoftheoneormorelanguagesthattheTAcanspeak.

CS6660 Final Exam Name:

3

3.DrawanERDforthefollowingscenario(showcardinality).Translatethediagramintotables:Theuniversitykeepstrackofeachstudent’sname,studentnumber,socialsecuritynumber,permanentaddressandseveralcontactnumbers,birthdate,age,sex,andmajor,anddegreeprogram(B.S.,M.S.,Ph.D.).Someuserapplicationsneedtorefertothecity,state,andzipcodeofthestudent’spermanentaddressandtothestudent’slastname.Bothsocialsecuritynumberandstudentnumberhaveuniquevaluesforeachstudent.

1.Eachdepartmentisdescribedbyaname,departmentcode,officenumber,officephone,andcollege.Bothnameandcodehaveuniquevaluesforeachdepartment.2.Adepartmentcantrainotherdepartments.(RecursiveRelationship)3.Eachstudentmustenrollinonedepartment.4.Eachcoursehasacoursename,description,andcoursenumber,numberofcredithours,level.Thevalueofcoursenumberisuniqueforeachcourse.5.Coursemaygeneratemanysections,eachhasasemester,year,sectionnumber,andreferencesasinglecourse.Thesectionnumberdistinguishessectionsofthesamecoursethataretaughtduringthesamesemester/year.6.Eachsectionmaycontainmanystudents

Student(Student_ID(PK),Department_ID(FK),…)Department(Department_ID(PK),Train_Department_ID(FK),…)Registration(Student_ID(PK),Section_ID(FK),…)Course(Course_ID(PK),…)Section(Section_ID(PK),year,semester)

top related