I have a query:
select daa.*
from Dataa daa
where not exists (select row() from Stuff)
Basically, when Stuff has data in it, the query returns nothing. However, when Stuff is empty, the query returns everything in Dataa. I need to rewrite this query with the same behavior, but without the exists keyword, so that I can translate it into Relational Algebra.
Some resources I've looked at are:
Converting NOT IN to NOT EXISTS http://mlwiki.org/index.php/Translating_SQL_to_Relational_Algebra#EXISTS_in_the_Where_Clause_.28by_example.29