Question: QUESTION 2 [25 MARKS] A database held in a relational Database Management System (DBMS) is as follows: Course (courseid, title, deptname, credits) Student (studentid, studentname,

 QUESTION 2 [25 MARKS] A database held in a relational Database

QUESTION 2 [25 MARKS] A database held in a relational Database Management System (DBMS) is as follows: Course (courseid, title, deptname, credits) Student (studentid, studentname, deptname, totalcredit) Department (deptname, building, phone) Instructor (instructorid, instructorname, deptname, salary) Enroll (enrollid, courseid, section, semester, year, grade) (a) Based on relation Enroll construct Structured Query Language (SQL) statement to create the Enroll table. [8 Marks) (6) Construct SQL statement to add the following columns in Department table: i) DeanName Varchar(20), refer to instructorid in table Instructor [4 Marks) (c) Construct SQL statement to modify the following columns in Department table: i) Phone with datatype Number to Phone with datatype Varchar (14). [2 Marks) (d) For each Department, find the maximum salary of instructors in that department. You may assume that every department has at least one instructor. [5 Marks] (e) Delete all records in Enroll table corresponding to any section of any course with the word database as a part of the title (you should make sure that your code is case-insensitive when matching the word with the title). [6 Marks]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!