# Question

Let the following relation schemas be given:

R = (A, B, C)

S = (D, E, F)

Let relations r(R) and s(S) be given. Give an expression in SQL that is equivalent to each of the following queries.

a. п A(r)

b. σB = 17 (r)

c. r × s

d. IIA, F (σC =D(r × s))

R = (A, B, C)

S = (D, E, F)

Let relations r(R) and s(S) be given. Give an expression in SQL that is equivalent to each of the following queries.

a. п A(r)

b. σB = 17 (r)

c. r × s

d. IIA, F (σC =D(r × s))

## Answer to relevant Questions

Let R = (A, B, C), and let r1 and r2 both be relations on schema R. Give an expression in SQL that is equivalent to each of the following queries. a. r1 ∪ r2 b. r1 ∩ r2 c. r1 − r2 d. II AB(r1) 1 ...Write an SQL query, without using a with clause, to find all branches where the total account deposit is less than the average total account deposit at all branches,a. Using a nested query in the from clauser.b. Using a ...Consider the insurance database of Figure, where the primary keys are underlined. Construct the following QBE queries for this relational-database.a. Find the total number of people who owned cars that were involved in ...Write an extended relational-algebra view equivalent to the Datalog rule p (A,C,D) :– q1 (A,B), q2 (B,C), q3 (4,B), D = B + 1 .Consider a view branch-cust defined as follows: create view branch-cust as select branch-name, customer-name from depositor, account where depositor.account-number = account.account-number Suppose that the view is ...Post your question

0