2 corrected a typo, improved formatting edited Dec 8 '17 at 15:20 Andriy M 18k66 gold badges4141 silver badges8282 bronze badges What you need to do is to get `R2'` and `R3'`, the projecttionsprojections of `R2` and `R3` respectively, with only the attribute `sid`. Then take their intersection for `R4`:``` R1 := ... R2 := ... R3 := ... --- R2' = πsid(R2)R2' := πsid(R2) R3' := πsid(R3) R4 := R2' ∩ R3' R3' = πsid(R3) R5 R4 := R2' ∩ R3' --- R5 = ... R6 := ... ``` What you need to do is to get `R2'` and `R3'`, the projecttions of `R2` and `R3` respectively, with only the attribute `sid`. Then take their intersection for `R4`:``` R1 = ... R2 = ... R3 = ... --- R2' = πsid(R2) R3' = πsid(R3) R4 := R2' ∩ R3' --- R5 = ... R6 = ... ``` What you need to do is to get `R2'` and `R3'`, the projections of `R2` and `R3` respectively, with only the attribute `sid`. Then take their intersection for `R4`:``` R1 := ... R2 := ... R3 := ... R2' := πsid(R2) R3' := πsid(R3) R4 := R2' ∩ R3' R5 := ... R6 := ... ``` 1 answered Dec 8 '17 at 13:19 ypercubeᵀᴹ 83.2k1111 gold badges142142 silver badges236236 bronze badges This is indeed the error: ``` R4 := R2 ∩ R3 ``` If we try to get the intermediate results of your solution, we get: R1: ```bid bname color sid date --- --------- ----- --- ---------- 102 interlake red 31 8/11/2014 103 clipper green 22 7/05/2014 103 clipper green 58 8/11/2014 104 clipper red 22 8/10/2014 ``` and then: R2: (only the 'red') ```bid bname color sid date --- --------- ----- --- ---------- 102 interlake red 31 8/11/2014 104 clipper red 22 8/10/2014 ``` R3: (only the 'green') ```bid bname color sid date --- --------- ----- --- ---------- 103 clipper green 22 7/05/2014 103 clipper green 58 8/11/2014 ``` `R4` will be an empty relation because nothing can be both red and green. Of course that is not what the exercise asks for. R4: ```bid bname color sid date --- --------- ----- --- ---------- ``` What you need to do is to get `R2'` and `R3'`, the projecttions of `R2` and `R3` respectively, with only the attribute `sid`. Then take their intersection for `R4`: ``` R1 = ... R2 = ... R3 = ... --- R2' = πsid(R2) R3' = πsid(R3) R4 := R2' ∩ R3' --- R5 = ... R6 = ... ```