Assignment 2

# Assignment 2 - OriginatingFacility ClubStatsID...

This preview shows pages 1–4. Sign up to view the full content.

Originating Facility Terminating Facility OCH TCH Area OFC STN State Start Time End Time Trunk_Channels PortID Channel State Trunk_Routes Port_ID Area Office Routes N N Service_Subscribers LineId ServiceCode N N Subscribers PortID Name Address Email Subscribe To 1 1 Forward To 1 1 Connect To 1 N Club Stats ID Points Earned Match Result Goals Fouls Yellow/Red Cards Ball Possession Match Match Number Location Date Result Referee SIN Name Address Experience(Years) Play 1 20 Match Played In 1 1 Employees Employs 1 N Has 1 N Match Stats Generates 1 1 Officiated By 1 5 Results In 1 1 Points Table Position Number Games Played Goals For Goals Against Goal Difference Points 1 N Name: Sanat Dixit Student Number: 100775970 Part 1 – Practice Questions Problem 1A – Foreign Keys and E-R Diagram Table SERVICE_SUBSCRIBERS attribute LINEID references Table LINES attribute STATIONCODE Table SERVICE_SUBSCRIBERS attribute SERVICECODE references Table SERVICES attribute SCODE Table CALL_FORWARD_NUMBERS attribute PORTID references Table SUBSCRIBERS attribute PORTID Table SUBSCRIBERS attribute PORTID references TABLE LINES attribute PORTID Table CALLS attribute ORIGINATING_FACILITY references Table FACILITIES attribute PORTID Table CALLS attribute TERMINATING_FACILITY references Table FACILITIES attribute PORTID Table CALLS attribute OCH references Table TRUNK_CHANNELS attribute CHANNEL Table CALLS attribute TCH references Table TRUNK_CHANNELS attribute CHANNEL

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
E-R Diagram Problem 1B: Relational Algebra Queries 1) A π Name, Area Code, Office Code, Station Code (SUBSCRIBERS (SUBSCRIBERS.PortID = LINES.PortID) LINES) 2) B π Name, Address, Email (SUBSCRIBERS (PortID = LineID) AND (ServiceCode = “CW”) SERVICE_SUBSCRIBERS) 3) C π PortID, Foriegn_Switch(TRUNKS ((TRUNKS.PortID = TRUNK_CHANNELS.PortID) AND (State = “Busy”)) TRUNK_CHANNELS)
4) TEMP π Call_ID, Name (CALLS (CALLS.Originating Facility = SUBSCRIBERS.PortID) SUBSCRIBERS) TEMP2 π Call_ID, Name (CALLS (CALLS. Terminating Facility = SUBSCRIBERS.PortID) SUBSCRIBERS) D(Originator, Terminator) π TEMP.Name, TEMP2.Name (TEMP (TEMP.Call_ID = TEMP2.Call_ID) TEMP2) 5) TEMP π PortID (CALL_FORWARD_NUMBERS (PortID = LineID) AND ((ServiceCode “CFD” ) OR (ServiceCode “CFB” ) OR (ServiceCode “CFN” )) SERVICE_SUBSCRIBERS) E (TEMP (TEMP.PortID = Lines.PortID) LINES) 6) F π Area Code, Office Code, Station Code (CALLS (Call_ID = 101) AND (Terminating Facility = PortID) CALL_FORWARD_NUMBERS) 7) IDLE π (CALLS (Call_ID = 202) AND (OFC = Office Code = 235) AND (STN = Station Code = 7667) AND (State = “Idle”) LINES) BUSY (CALLS π (Call_ID = 202) AND (OFC = Office Code = 235) AND (STN = Station Code = 7667) AND (State = “Busy”) LINES) 8) BUSY π PortID (CALLS

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.
• Spring '10
• Neel
• relation, Baseball statistics, Association football terminology, Games played, String String String, Goal difference

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern