[db] Added search for targets and thus ported target table to server side processing