2.3k views

Let r be a relation instance with schema R = (A, B, C, D). We define $r_1 = \pi_{A, B, C} (R)$ and $r_2=\pi_{A, D} (r)$. Let $s =r_1 \: * \: r_2$ where $*$ denotes natural join. Given that the decomposition of $r$ into $r_1$ and $r_2$ is lossy, which one of the following is TRUE?

1. $s \subset r$

2. $r \cup s =r$

3. $r \subset s$

4. $r^*s=s$

retagged | 2.3k views
0

here if consider

R
A B C D
1 2 3 4
5 6 7 8
R1
A B C
1 2 3
5 6 7
R2
A D
1 4
5 8
S = R1 * R2
A B C D
1 2 3 4

5 6 7 8

now it satisfying option b & d kindly correct me where m wrong

+6
Given that decomposition of r into r1 and r2 is lossy.. that means A (which is common attribute in r1 and r2) shouldn't be Key for any of relation.. but in your example A works as key for both r1 and r2..

Thats why u r getting option B or D..

Ryt ??
0
but it doesnot matter y cnt b & d just say
0
U r getting B or D in a particular case only, not always..
0
but to make false only 1 case is sufficient na then y not considering b & d???????????
0

$r \subset s$ is it proper subset ?

Answer is C$r \subset s$

R
A B C D
1 2 3 3
1 5 3 4
R1
A B C
1 2 3
1 5 3
R2
A D
1 3
1 4
S = R1 * R2
A B C D
1 2 3 3
1 2 3 4
1 5 3 3
1 5 3 4

Red color rows of S are present in R so $R \subset S$

and one more result R * S = R.

selected by
0
Arjun Sir,

Is this not the case that lossless-join property is also non-additive join property?

So, when we say that a decomposition follows the "lossless join property" ,it asserts that the "natural join of the decompositions of the relation should not result in spurious tuples(non-additive) or tuples lost(lossy property)".

Since in the above question, it is clearly mentioned that natural join is lossy, doesn't that mean that there are certain tuples lost. i.e s⊂r.

Hence  s⊂r poses me as an answer.

Please correct me if I have misinterpreted this.
+8

Since in the above question, it is clearly mentioned that natural join is lossy, doesn't that mean that there are certain tuples lost. i.e s⊂r.
LOSSY JOIN MEANS THAT WE GET SOME EXTRA TUPLES WHICH ARE NOT PRESENT IN THE RELATION AND IT DOESNT MEAN THAT TUPLES ARE LOST..

+3
@sushmita,-No. Lossy decomposition means that you would get your original result plus some extra tuples that do not belong to the original relation decomposed.

Now when these database tables are large, you wouldn't want to go and manually check for spurious tuples which arise out of such condition. That's why lossless decomposition is a desirable property of decomposition which enforces that common attributes of decomposition must be a key to any one of the sub-relation arising out of decomposition.

which you must have seen in books like

R1$\cap$R2 ->R1

or R1$\cap$R2 ->R2
in short what happens in lossy when you join the tables r1 ,r2 to form r you get the tuples already in r and also some extra tuples(spurious tuples) which makes the table ambiguous like a person having previously one address now its showing more than one address .so to conclude r is a subset of s..

http://stackoverflow.com/questions/12671362/lossy-decomposition

Here

decomposition of r to r1 and r2 is lossy.

Lossy decomposition :R1 and R2 has a common attribute but the common attribute A is not key in either of R1 or R2.

Due to this when R1 and R2 are joined,we get spurious tuples which are not in Original R.

s=r1*r2

C.rs

0
Short and clear logic
(a) (b) and (d)

Reason:

obviously c(r cannot be a subset of s, since r1 and r2 are lossy decomposition) not true

a should be true(since s cant have values outside r)

d(natural join takes common element) since a is true
+3
How you are getting a, b ? Your answer is wrong !

+1 vote