SQL script data into database 1) The University hired a new professor to teach a
ID: 3912376 • Letter: S
Question
SQL script data into database
1) The University hired a new professor to teach a new class. The name of the class is ENG250 and is called “Ways To Learn”. Professor Luke will be teaching one section of this course on Tuesdays from 5:00 until 7:30 PM. Write the SQL script(s) that will insert this data into the database.
2) Ron is planning on having his sabbatical this semester so Luke will be teaching his class for him. The Business Programming class will still be taught on the same day and time. Write a query to reflect this change in the database.
3) The University has asked the professors to evaluate the curriculum and make it more current. There are new classes that needed to be added to improve the currency of our ENG program. To make room for a new class we must remove an older class so that the number of credit hours required to graduate will remain unchanged. It was decided that we no longer need ENG1150, so this class should be removed from the course catalog. Write the SQL script(s) that will remove ENG1150 from the database.
Explanation / Answer
CREATE DATABASE UNIVERSITY;
CREATE TABLE univ(
class name varchar(255);
Class hours int;
days varchar(255);
professor name varchar(255);
);
INSERT INTO univ (class name, class hours, days, professor name)
VALUES (ENG250, 2:30, tuesday, luke)
UPDATE univ
SET class name = 'business programming', teacher name='luke', days='tuesday';
DELETE FROM univ
WHERE class name='ENG1150';
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.