recategorized by
1,998 views

3 Answers

Best answer
9 votes
9 votes
select PNO from P Where COLOUR='BLUE';

This can be written as: $\pi_{pno}(\sigma_{colour='Blue'}(P))$

Store this in T1.

$\therefore$ $T1\leftarrow\pi_{pno}(\sigma_{colour='Blue'}(P))$

Then

select SNO from SP 
where PNOin (select PNO from P
             Where COLOUR='BLUE'))

$T2\leftarrow\pi_{sno}(\sigma_{pno=T1}(SP))$

Similary

Select SNAME from S
Where SNOin (select SNO from SP
             where PNOin (select PNO from P
                          Where COLOUR='BLUE'));

$Result\leftarrow\pi_{sname}(\sigma_{sno=T2}(S))$

selected by
5 votes
5 votes

SELECT the name of the Supplier who has supplied Blue Color Parts.

(as no detailed description is given I have taken it as supplier table, catalogue table and parts Table for convenience).

5 votes
5 votes

$\pi_{SNAME}(\sigma_{S.SNO = SP.SNO \ and\  SP.PNO = P.PNO\ and\  COLOR="BLUE"  } (S \times SNO \times P))  $

 

Related questions

5 votes
5 votes
3 answers
1
go_editor asked Dec 20, 2016
1,334 views
Select SNAME from S Where SNOin (select SNO from SP where PNOin (select PNO from P Where COLOUR='BLUE'))What relations are being used in the above SQL query? Given at lea...
5 votes
5 votes
1 answer
2
4 votes
4 votes
1 answer
3
9 votes
9 votes
1 answer
4
go_editor asked Dec 19, 2016
1,763 views
What are the three axioms of functional dependency for the relational databases given by Armstrong.