Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

takes ID course id sec id semester year grade student ID name dept_name tof_cred section course_id sec_id semester year building room_number time_slot_id course course_id title

image text in transcribedimage text in transcribedimage text in transcribed

takes ID course id sec id semester year grade student ID name dept_name tof_cred section course_id sec_id semester year building room_number time_slot_id course course_id title dept_name credits department dept_name building budget advisor sid i_id time_slot time_slot_id day start_time end_time classroom building room_number capacity prereq course_id prereg id instructor ID name dept_name salary teaches ID course id sec id semester year Figure A.1 Schema diagram for the university database. A.1 Full Schema The full schema of the university database that is used in the text follows. The corre sponding schema diagram, and the one used throughout the text, is shown in Figure A.1. classroom(building, room_number, capacity) department(dept_name, building, budget) course(course_id, title, dept_name, credits) instructor(ID, name, dept_name, salary) section(course_id, sec_id, semester, year, building, room_number, time_slot_id) teaches(ID, course_id, sec_id, semester, year) student(ID, name, dept_name, tot_cred) takes(ID, course_id, sec_id, semester, year, grade) advisor(s_ID, i_ID) time_slot(time_slot_id, day, start_time, end_time) prereq(course_id, prereq_id) 3.12 Write the SQL statements using the university schema to perform the following operations: a. Create a new course CS-001, titled Weekly Seminar, with 0 credits. b. Create a section of this course in Fall 2017, with sec_id of 1, and with the location of this section not yet specified. Enroll every student in the Comp. Sci. department in the above section. d. Delete enrollments in the above section where the student's ID is 12345. e. Delete the course CS-001. What will happen if you run this delete state- ment without first deleting offerings (sections) of this course? Delete all takes tuples corresponding to any section of any course with the word "advanced as a part of the title; ignore case when matching the word with the title

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

Microsoft SQL Server 2012 Unleashed

Authors: Ray Rankins, Paul Bertucci

1st Edition

0133408507, 9780133408508

More Books

Students also viewed these Databases questions

Question

Write an article on "Exercise and health promotion".

Answered: 1 week ago