Write a check constraint that expresses the following


Exercise 1:

Write a CHECK constraint that expresses the following condition on attribute Rating in table Movies in Movie Database: "Any possible value of Rating is either a null value or a number in the interval from 0 to 10 inclusively". 

Exercise 2:

Write a CHECK constraint that expresses the following condition on records in table Laptop in Hardware Database: "If the screen is larger than 20, then the price is higher than 2000".

Exercise 3:

Write a CHECK constraint that expresses the following condition on table Schedule in University Database: "Each course (occurring in this table) is offered at least two times". Hint: Use NOT EXISTS.

Exercise 4:

Write a CHECK constraint that expresses the following condition on table StarsIn in Movie Database: "Each movie (occurring in this table) has at most one director". Hint: Use NOT EXISTS.

Solution Preview :

Prepared by a verified Expert
Database Management System: Write a check constraint that expresses the following
Reference No:- TGS01252611

Now Priced at $35 (50% Discount)

Recommended (99%)

Rated (4.3/5)