in Others edited by
1,914 views
1 vote
1 vote

Consider two relations $\mathrm{R}(\mathrm{x}, \mathrm{y})$ and $\mathrm{S}(\mathrm{y})$, and perform the following operation.

                                                               $\text{R(x, y) DIVIDE S(Y)}$

If $\mathrm{X}$ is the relation returns by the above operation, which of the following  option(s) is/are always TRUE?

  1. $|X| \leq|R|$
  2. $|X| \leq|S|$
  3. $|X| \leq|R|$ AND $|X| \leq|S|$
  4. All of the Above

     

in Others edited by
by
1.9k views

2 Comments

This question belongs to which subject ?
0
0
Dbms
0
0

2 Answers

7 votes
7 votes
only A is true because we know that $X \times S \subseteq R$ so $|X| \le |R|$ and $|S| \le |R|$

consider

$$R = \begin{array} {|r|r|}\hline 1 & A \\ \hline 1 & B \\ \hline 2 & A \\ \hline 2 & B \\ \hline 3 & A \\ \hline 3 & B \\ \hline  \end{array}$$

$$S = \  \begin{array} {|r|r|}\hline A \\ \hline B \\ \hline  \end{array}$$

then $X = \begin{array} {|r|r|}\hline 1 \\ \hline 2 \\ \hline 3 \\ \hline  \end{array}$ so b is false
edited by

3 Comments

What is actually meant by | X |, | S |, | R |? Are they the elements of Relation?
0
0
can you explain why other are not the asnwer?
0
0

it says always true and the counter example I provided proves that B and C are not always true

0
0
0 votes
0 votes
  • The correct option is (C) |X| ≤ |R| AND |X| ≤ |S|.

    • R(x, y) DIVIDE S(y): Since X is a subset of R (it contains only tuples from R that have corresponding tuples in S), its cardinality (number of tuples) will always be less than or equal to the cardinality of R.
    • Common Attribute Restriction: The DIVIDE operation also restricts the tuples in X to those with y values present in S. This means the cardinality of X cannot exceed the cardinality of S.
  • Therefore, |X| ≤ |R| AND |X| ≤ |S| are always true.

Why other options are incorrect:

  • (A) |X| ≤ |R|: This is true, but it doesn't capture the full constraint.
  • (B) |X| ≤ |S|: This is also true, but it doesn't include the constraint with R.
  • (D) |X| > |R|: This is impossible because X is a subset of R, so its cardinality cannot be greater than R's.

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

64.3k questions

77.9k answers

244k comments

80.0k users