When we use SQL, we just express our intent. For example, consider this:
mysql> select count(*) from book where author like '%wodehouse%';
We just say what we are looking for. The actual mechanism that gets the answer is hidden from us. The following is a little too simplistic but suitable example to prove the point.
The SQL engine will have to loop over the table and check whether the author column contains the
wodehouse string. We really don't need to worry about the search algorithm. The
author table resides on a disk somewhere. The number of table rows that need to be filtered could easily exceed the available memory. The engine handles all such complexities for us though.
We just declare our intent. The ...