in Databases
1,055 views
1 vote
1 vote

Book claims that below query translates to relational algebra expression $P/Q$. Can anyone explain how does the below query translates to relational algebra expression $P/Q$?

Assume $Q$ has attributes $B_1,B_2,...,B_m$ and that $P$ has in addition the attributes $A_1,A_2,...,A_n$.

 How above query equates to relation algebra expression $P/Q$?

in Databases
1.1k views

1 Answer

1 vote
1 vote

$\prod$ A1, A2...An(P) - (($\prod$ A1, A2...An(P) $\times$ $\prod$B1, B2...Bn(Q)) - $\prod$A1, A2...An(P))

1 comment

Your relational algebra query has $(\prod A_1,...,A_n)$ thrice, whereas the SQL statement has (SELECT A1,....,An) only once. Can you please highlight which part of your relational algebra expression corresponds to which part of the SQL query?

0
0

Related questions