Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Task 1: Based on the relational schema diagram provided by the instructor, develop relational-algebra queries for the following tasks. 1. Find the tutors who

image  
image

Task 1: Based on the relational schema diagram provided by the instructor, develop relational-algebra queries for the following tasks. 1. Find the tutors who are responsible for tutoring the same courses as 'Jim Champ' (Suppose there is only one User called Jim Champ). List their user ids. 2. Find faculty who are also students. List their names. 3. List names of tutors who are hired by College 'CLAS' (ID) and Campus 'iusb' (ID). 4. Count the total number of OnCalls and Appointments that Tutor 9003(ID) hired by Unit 'CS' (ID) of Campus 'iusb' (ID) attended in May 2021. Only status in attended (char value '3') will be counted. PF Campus D PID * Name Phone - Type F Unit Clige ID Unit PK (Campus Unit Campus FK (Campus ID) UnitCollege FK (Unit_Clige_ID) PID * Nama PF Unit Campus ID PF Unit ID Description Address ON City State Unit VARCHAR2 (20 CHAR) VARCHAR2 (20 CHAR) VARCHAR2 (50 CHAR) VARCHAR2(15 CHAR) CHAR (1 CHAR) INTEGER ID, ID) Non Academio Unit Country URL Campus_PK (ID) VARCHAR2 (20 CHAR) VARCHAR2 (20 CHAR) VARCHAR2 (100 CHAR) VARCHAR2 (20) VARCHAR2 (30 CHAR) Campus VARCHAR2 (50 CHAR) VARCHARZ (20 CHAR) VARCHAR2 (20 CHAR) VARCHAR2(10 CHAR) VARCHAR2 (50 CHAR) Non Academic Unit PK (Unit Campus_ID, Unit_ID) Non Academic Unit_Unit_FK (Unit_Campus_ID, Unit_ID) W PF IP IF I PE ID Name Phone Email URL Unit Campus D Unit 10 ID College 10 D PID INTEGER Unit Cige PK (0) College VARCHAR2 (20 CHAR) VARCHAR2(30 CHAR VARCHAR2(15 CHAR) VARCHAR2 (50 CHAR) Campus D Unit Clige ID College PK (ID) College Campus FK (Campus_10) College Unit Clige FK (Unit_Clige_ID) VARCHAR2(50 CHAR) VARCHAR2 (20 CHAR) INTEGER Academic Unit VARCHARZ (20 CHAR) VARCHARZ (20 CHAR) VARCHARZ (20 CHAR Academic Unit PK (Unit_Campus_ID, Unit_10) Academic Unit_Unit FK (Unit Campus_ID, Unit_ID) Academic Unit College FK (College ID) Unit Clie PF Tutor User ID PF Tutor Unit College ID PF Course Code PF Course Number INTEGER INTEGER PF" USER ID P Phone VARCHAR2(15CHAR) Tutor Responsible Courses INTEGER VARCHAR2(15 CHAR User Phone PK (USER_ID, Phone) User Phone User_FK (USER_ID) Supervisor PF* User D INTEGER Office Hour VARCHAR2(40 CHAR) Supervisor PK (User ID) Supervisor Faculty_FK (User ID) User Phone PF" User ID F PF Unit College ID Pay Rate Supervisor ID Tutor PK (User ID, Unit College_ID) Tutor Unit Clige FK (Unit Collage Tutor Supervisor FK (Supervisor_ID) Tutor User FK (UD) INTEGER INTEGER NUMBER INTEGER P Code P-Number - Tie F Unit Cige D INTEGER Tutor Responsible Courses PK (Tutor User ID, Tutor Unit College ID, Course Code, Course Number) TRC Course FK (Course Code Course Number) TRC Tutor FK (Tutor User ID, Tutor Unit College ID) Course VARCHAR2(15 CHAR) INTEGER VARCHAR2(20 CHAR) INTEGER Course PK (Code Number) Course Unit Clige FK (Unit_Clige ID) 75 Tutor D First Name Last Name Email User PK (D) F F ++ PF User ID Rank User INTEGER VARCHARZ (20 CHAR) VARCHAR2(30 CHAR) VARCHAR2(50 CHAR) Start Time End Time task type Status Course Code Course Number Faculty PK (User_ID) Faculty User FK (User ID) Tutor User Tutor Unt College ID Faculty User ID Location *OnCalDate Faculty INTEGER VARCHAR2 (30 CHAR) OnCall INTEGER INTEGER INTEGER INTEGER VARCHAR2(100 CHAR) DATE TIMESTAMP TIMESTAMP CHAR (1 CHAR) CHAR (1 CHAR) VARCHAR2(15 CHAR) INTEGER PF App ID PF Course Code PF Course Number PF" User ID * Grad Flag +H OnCal PK (D) OnCall Faculty FK (Faculty User ID) OnCall Course FK (Course Code, Course Number) OnCall Tutor FK (Tutor User ID, Tutor Unit College ID) PID F F F Student PK (User ID) Student User FK (User ID) Student INTEGER CHAR (1 CHAR) Location AppDate Start Time End Time Tutor User ID Tutor Unit College ID Student User ID Appt Appt For Course INTEGER VARCHAR2 (15 CHAR) INTEGER INTEGER VARCHAR2 (30 CHAR) DATE TIMESTAMP TIMESTAMP CHAR(1 CHAR) INTEGER INTEGER INTEGER Appt PK (ID) Appt Student FK (Student User ID) Appt Tutor FK (Tutor_User_ID, Tutor_Unit College_ID) Appt For Course PK (Appt ID, Course Code, Course Number) Appt For Course Appt FK (Appt_ID) Appt For Course Course FK (Course_Code, Course Number)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Quantitative Analysis For Management

Authors: Barry Render, Ralph M. Stair, Michael E. Hanna

11th Edition

9780132997621, 132149117, 132997622, 978-0132149112

More Books

Students also viewed these Databases questions

Question

Define self-esteem and explain its importance.

Answered: 1 week ago