Question: Consider this query: SELECT * FROM A a WHERE NOT EXISTS (SELECT * FROM B b WHERE ax=bx; Which of the following blocks of pseudo

Consider this query: SELECT * FROM A a WHERE NOT EXISTS (SELECT * FROM B b WHERE ax=bx; Which of the following blocks of pseudo code best represent the query? If multiple blocks represent it, pick the more efficient one. Block 1: foreach a in A{ foreach b in B{ if (ax==bx){ add a to output break } Block 2: add everything in A to output foreach a in A{ foreach b in B{ if (ax==bx){ remove a from output break \} Block 3: add everything in A to output foreach a in A{ foreach b in B{ if (a.x==bx){ remove a from output } \} Block 4: foreach a in A{ foreach b in B{ if (axI=bx){ add a to output break \}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
