[prev] 42 [next]

Exercise 6: Mapping OR expressions

Possible mappings for WHERE expressions with AND are

SELECT   ...   FROM   ... R ...   WHERE  ... X AND Y ...

⇒    Select[X & Y](R)    or    Select[X](Select[Y](R))

What are possible mappings for

SELECT   ...   FROM   ... R ...   WHERE  ... X OR Y ...

Use these to translate:

select * from R where (a=1 or a=3) and b < c