Can Someone help me with the following questions.Thank you.

All of the questions use the following database schema, in whichthe keys of each relation are underlined:

Movie(title, year,director, budget, earnings)

Actor(stagename,realname, birthyear)

ActedIn(stagename,title, year, pay)

CanWorkWith(stagename,director)

Note: the CanWorkWith relation storesinformation on which actors are able to work with which directors –this is important as occasionally an actor will absolutely refuseto work with a given director (or vice-versa).

Question 1

For each of the following pairs of queries, determine whether ornot the queries are equivalent. You must explainyour answer. Think carefully – to be equivalent, the queries mustprovide exactly the same answer for every possibleset of valid data.

a) [2 marks] (i) πstagename(opay > earnings-budget (ActedIn Movie)) (ii) SELECT A.stagename FROM WHERE ActedIn A, Movie M A.title=M.t A.pay > M·earnings -M·budget itle AND A. year = M. year AND b) [3 marks] (i) ρ (MI (title → tl, year → yl, director → dl, budget → bl, earnings → el), Movie) pCM2(title → 12, year → y2, director → d2, budget → b2, earnings → e2), Movie) (ii) ρ (MI (title → tl, year → yl, director → dl, budget → bl, earnings → el), Movie) pCM2(title → t2, year → y2, director → d2, budget-> b2, earnings → e2), Movie)

a) [2 marks] (i) πstagename(opay > earnings-budget (ActedIn Movie)) (ii) SELECT A.stagename FROM WHERE ActedIn A, Movie M A.title=M.t A.pay > M·earnings -M·budget itle AND A. year = M. year AND b) [3 marks] (i) ρ (MI (title → tl, year → yl, director → dl, budget → bl, earnings → el), Movie) pCM2(title → 12, year → y2, director → d2, budget → b2, earnings → e2), Movie) (ii) ρ (MI (title → tl, year → yl, director → dl, budget → bl, earnings → el), Movie) pCM2(title → t2, year → y2, director → d2, budget-> b2, earnings → e2), Movie) Show transcribed image text a) [2 marks] (i) πstagename(opay > earnings-budget (ActedIn Movie)) (ii) SELECT A.stagename FROM WHERE ActedIn A, Movie M A.title=M.t A.pay > M·earnings -M·budget itle AND A. year = M. year AND b) [3 marks] (i) ρ (MI (title → tl, year → yl, director → dl, budget → bl, earnings → el), Movie) pCM2(title → 12, year → y2, director → d2, budget → b2, earnings → e2), Movie) (ii) ρ (MI (title → tl, year → yl, director → dl, budget → bl, earnings → el), Movie) pCM2(title → t2, year → y2, director → d2, budget-> b2, earnings → e2), Movie)