Question: We expect the constraint an instructor cannot teach sections in two different classrooms in a semester in the same time slot to hold. a. Write

We expect the constraint “an instructor cannot teach sections in two different classrooms in a semester in the same time slot” to hold.

a. Write an SQL query that returns all (instructor, section) combinations that violate this constraint.

b. Write an SQL assertion to enforce this constraint (as discussed in Section 4.4.8, current generation database systems do not support such assertions, although they are part of the SQL standard).

Step by Step Solution

3.38 Rating (167 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

a SELECT DISTINCT instructor section FROM teaches WHERE EXISTS SELECT FROM teaches AS t1 WHERE t1... View full answer

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 Database System Concepts Questions!