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: