0 votes 0 votes thor asked Jan 7, 2017 thor 544 views answer comment Share Follow See all 11 Comments See all 11 11 Comments reply thor commented Jan 7, 2017 reply Follow Share It's not mentioned where does $T$ points to? 0 votes 0 votes Kaushik.P.E commented Jan 7, 2017 reply Follow Share Look at the predicate condition. T.pname = P.pname . So T will contain the attribute pname with values that satisfies the condition. 0 votes 0 votes thor commented Jan 7, 2017 reply Follow Share p is a tuple variable that points to table project. but it is not mentioned where T points to. 0 votes 0 votes Kaushik.P.E commented Jan 7, 2017 reply Follow Share T also becomes a tuple variable of the table after the execution of this condition T.pname = P.pname . 0 votes 0 votes thor commented Jan 7, 2017 reply Follow Share you mean to say it points to table after T.pname? are you sure of this behaviour? 0 votes 0 votes Kaushik.P.E commented Jan 7, 2017 reply Follow Share ya i am sure. that's the general convention actually. 1 votes 1 votes thor commented Jan 7, 2017 reply Follow Share @santhoshdevulapally Can you confirm me this? 0 votes 0 votes santhoshdevulapally commented Jan 7, 2017 reply Follow Share Here only one relation is needed i.e)Project T: PNO PNAME DURATION P1 X 3(months) P2 Y 4 P3 X 5 P4 Z 3 P: PNO PNAME DURATION P1 X 3(months) P2 Y 4 P3 X 5 P4 Z 3 Simplified Query is select T.pname from T,P where T.pname=P.pname and P.duration=3. Hence it returns all projects of duration 3 months. 0 votes 0 votes Kaushik.P.E commented Jan 7, 2017 reply Follow Share select T.pname from project T, project P where T.pname=P.pname and P.duration=3. isnt this correct? 0 votes 0 votes santhoshdevulapally commented Jan 7, 2017 reply Follow Share why ?? 0 votes 0 votes Kaushik.P.E commented Jan 7, 2017 reply Follow Share sorry didn't notice that you've defined the tables twice... But i think this might confuse ppl further. After the assignment both T and P will be tuple variables of the table. this is the general convention. 1 votes 1 votes Please log in or register to add a comment.
1 votes 1 votes Look at the predicate condition. T.pname = P.pname . So T will contain the attribute pname with values that satisfies the condition. Kaushik.P.E answered Jan 7, 2017 Kaushik.P.E comment Share Follow See all 0 reply Please log in or register to add a comment.