movie review database

movie review database

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 with us and get 18% discount now! to earn your discount enter this code: special18  If you need assistance chat with us now by clicking the live chat button.

 

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