Question: In this assignment, you will implement several queries and triggers in SQL for the Yelp Edmonton database created in Assignment 3 . Here are once

In this assignment, you will implement several queries and triggers in SQL for the Yelp Edmonton database created in Assignment 3. Here are once more the database tables:
Assignment 4.2(50 marks)
Formulate the following integrity constraints as triggers in SQL Server SQL:
a) When a new review is registered, update the number of review count for the corresponding business. If a review is submitted by a user who has already reviewed for that business, older reviews to be ignored and only the latest review from each user should be considered for the business calculating the number of reviews. (30 marks)
b) Implement a rule that users can only leave a review for a business if they have at least one friend who has also reviewed that business. This rule should only apply to new reviews and should not affect any existing reviews already recorded in the database. (20 marks)
In this assignment, you will implement several queries and triggers in SQL for the Yelp Edmonton database created in Assignment 3. Here are once more the database tables:
WRITE TRIGGER FOR 4.2A and 4.2B include test cases for these test cases where on fails and one passes INCLUDE TEST CASES PLS AND THE TRIGGER IS FOR 4.2a and 4.2B WHICH ARE DESCRIBED ABOVE USE THE DATABASES PROVIDED
In this assignment, you will implement several

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!