Request Form Logic: "Like" vs. "Equals"

Our application provides several query interfaces, which are mainly text inputs. Is there a best practice for whether the backend logic should introduce a query parameter using wildcards, and then do similar or just make equal. Of course, another option would be to allow the user to use wildcards, and then check and use the "how" if necessary.

I understand the importance of the performance of using a wildcard like this, and that this can be seen as a subject matter, I just want to know if there is standard practice.

+4
source share
1 answer

This is what I would like to leave to the user, allowing me to make a choice then. All user interfaces that I saw to allow user conditions have:

  • checked column.
  • a drop-down list containing relationships such as equal to , not equal to , less than , greater than , starts with .
  • the value you want to compare with.

Then, for the starts with option, you just click on % and use like .

You will notice (for performance reasons that you seem to already understand) I used starts with , rather than like , to limit the ability to drag and drop database performance.

I'm not a big fan of unlimited like statements, although you can also provide ends with for those DBMSs that can store reverse indexes.

+2
source

All Articles