in Databases
369 views
1 vote
1 vote
Let R and S be two relations with the following schema

R(P−−,Q−−,R1,R2,R3)

S(P−−,Q−−,S1,S2)

where {P,Q} is the key for both schemas?

R:{⟨"1","abc","p1","p2","p3"⟩,

⟨"2","xyz","p1","p2","p3"⟩}

S:{⟨"1","abc","q1","q2","q3"⟩

⟨"2","def","q1","q2","q3"⟩

WHat is R  *S? WHERE * IS NATURAL JOIN.
in Databases
by
369 views

4 Comments

First thing first, the instance of relation S in your comment is - ${⟨"1","abc","q1","q2"⟩,⟨"2","def","q1","q2"⟩}$. No $q_3$.

Next to your question. Natural join of given two relations will be -

$P$ $Q$ $R_1$ $R_2$ $R_3$ $S_1$ $S_2$
$1$ $abc$ $p_1$ $p_2$ $p_3$ $q_1$ $q_2$
0
0

@prateekdwv Yes Sir, you're absolutely right. There's no S3 in S relation.

I know, you answered here - https://gateoverflow.in/491/gate2008-68#c174617, But PLEASE, will you tell me - 

in Gate 2008 Question mein woh keh rahe hai ke (P,Q) collectively key hai, toh Sir, mera question yeh hai ke aap upar mere ques mein dekhe ke - 

Jo R table mein P,Q attribute ke values hai {1,2 and abc,xyz} toh hum S relation mein bhi P,Q ke values S relation ke dono tuples mein same kyun nai leh sakte? 

Simply bolo toh (P,Q) in both R and S mein exactly same kyun nai ho sakte?

0
0
We can, what can stop us from taking same values of (P,Q) in both the relations.
0
0

Please log in or register to answer this question.

Related questions