comedy films

comedy films
This assignment is based on the movie review database . Three tables, Viewer, Movie, and Rating, are involved.
1. Write a procedure to drop a movie. Your procedure would take in a Movie ID. If no reviewer has reviewed this movie before, simply delete it from the movie table. The deletion command in SQL is:
DELETE FROM table_name
WHERE some_column=some_value;
Otherwise, delete all rows in the rating table where this movie was reviewed, then delete the movie.
2. Write a function to compute the number of comedy films a reviewer rated. Your function will take in a viewer UserID and return the count of movies.
3. Write a trigger to check this constraint when a viewer rates a movie:
“Any reviewer can’t review the same movie twice”
PLACE THIS ORDER OR A SIMILAR ORDER WITH US TODAY AND GET AN AMAZING DISCOUNT 🙂

© 2020 customphdthesis.com. All Rights Reserved. | Disclaimer: for assistance purposes only. These custom papers should be used with proper reference.