In my database application I'm intending to give the users simple glob pattern search possibility besides standard search of text literal. (Let's keep it simple for purpose of this question.)
They will be able to use *, ? and [...] for character matching. Such a pattern is converted to LIKE for T-SQL queries, to RLIKE in MariaDB queries and to VB.NET Like or C# LikeString() invocation for in-memory search.
My question is regarding glob pattern characters: is it OK to encourage users to get familiar with * and ? if these (used in SQL-89) were abandoned since SQL-92 in favor of % and _?.
Honestly, I think that for non-advanced users, * and ? are better than % and _ because:
- users know them from OS file masks
- they appear in data less often than
%and_ - they are better indicating their wildcard nature than
%and_which are a bit ambiguous (50%can confuse unexperienced users to think it is literal)
Are there any real reasons why I should favorize % and _? If SQL-92 did, perhaps they had some reasons...
Aucun commentaire:
Enregistrer un commentaire