edited by
464 views
1 votes
1 votes

Consider the following relations and query.
$$
\begin{gathered}
\textsf{r(A, B, C)}\\
\textsf{s(A, B, C)}\\
\sigma_{\textsf{A>C}}([(\textsf{r} \cup \text{s) - (r - s)] - (s - r))}
\end{gathered}
$$
Which of the following is equivalent to the above query?

  1. $\sigma_{\textsf{A>C}}(\textsf{r} \bowtie \textsf{s})$
  2. $\sigma_{\textsf{A>C}}(\textsf{r} \cup \textsf{s})$
  3. $\sigma_{\textsf{A>C}}(\textsf{r}) \cap \sigma_{\textsf{A>C}} (\textsf{s})$
  4. $\sigma_{\textsf{A>C}}(\text{r} \cap \textsf{s})$
edited by

1 Answer

1 votes
1 votes

From set theory or the Venn diagram, we can note that

$((\textsf{r} \cup \textsf{s) - (r - s) - (s - r)) = r}\cap \textsf{s}$

$\textsf{r} \cap \textsf{s = r - (r - s)}$

We can see that
$((\textsf{r} \cup \textsf{s) - (r - s) - (s - r)) = r} \cap \textsf{s}.$


edited by
Answer:

Related questions