Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Given the following relational schema where primary keys are underlined and foreign keys are marked with #: Instructor (Instructor_Id, Instructor_Name, specialization, Address, #Department_Id) Department (Department_Id,

Given the following relational schema where primary keys are underlined and foreign keys are marked with #: Instructor (Instructor_Id, Instructor_Name, specialization, Address, #Department_Id) Department(Department_Id, Department_Name) Course(Course_code, Course_Title, Credit_hours, Contact_hours,#Department_Id) Teaching(#Instructor_Id, #Course_code) a) Express in SQL the following queries: i. Change to 6 the number of contact hours of the course which has the code ITDR2104.[1] ii. Add a new column named instructorLoad of type Number(2) to the table instructor. [1] iii. List the details of all the courses having a code that starts with ITDR. The output should be sorted in descending order by credit hours. [1] iv. Find the number of courses taught by the instructor whose name is Ahmed. [1.5] v. List the names of all departments along with the number of courses offered by each department. [1.5] vi. Find the titles of courses, which are taught by the instructor who is named Ahmed.[1.5] b) Create a view named instructor_of_DBCourse to contain the details (Instructor_Name, specialization, Address, Department_Id) of instructors who teach the course having the code ITDR2106.[2.5]

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

Step: 3

blur-text-image

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

Graph Databases New Opportunities For Connected Data

Authors: Ian Robinson, Jim Webber, Emil Eifrem

2nd Edition

1491930896, 978-1491930892

More Books

Students also viewed these Databases questions