Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Movie (MovieID, Title, Year, Score, Votes) Actor(ActorID, Name) Casting (MovieID

ID: 3881113 • Letter: M

Question

Movie (MovieID, Title, Year, Score, Votes)

Actor(ActorID, Name)

Casting (MovieID, ActorID, Ordinal)

You need to create a le called constraints.sql, which is a text le containing

your constraints for each of the questions given below.

1. (10 points) The default actor name is `Adam Sandler'.

2. (10 points) The score for a movie must be a value between 0 and 10.

3. (10 points) After you successfully set up the score constraint, first you then disable the constraint; second you enable the constraint.

Explanation / Answer

1) ALTER TABLE Actor
ALTER COLUMN Name SET DEFAULT 'Adam Sandler';

2) ALTER TABLE Movie ADD CONSTRAINT check_score CHECK (Score BETWEEN 0 and 10);

3) Statement to disable constraint 2

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote