24

Reading this Meta post, I can see SO added a tooltip to encourege users opening a SQL tagged question to add more relevant SQL driver (engine) tags.

But in reality it seems this tooltip doesn't deliver. It has none or very litter impact - still too many SQL questions (example) are tagged with the SQL tag but without tagging the database engine the OP is referring to (Access, MS-SQL, Oracle etc.). This almost always results in downvoting such questions and with tons of comments asking the OP to specify "Which database are you using?", and in some cases, closing the question as "unclear what you're asking".

I really can't imagine a question general to SQL as a database language only, since this language varies between the different engines.

Should SO force tagging one of the database engines for questions opened only with the SQL tag?

And if I may be even bolder, since it has no real right to exist alone, should the SQL tag be deprecated?

22
  • 6
    We are doing the best we can to motivate people to provide the required information. Not a good sign that it is not working. Sep 12, 2017 at 13:23
  • @CodyGray Seems this message has no or very little impact - in reality, I dare to say most of the SQL questions are opened without a driver tag
    – Koby Douek
    Sep 12, 2017 at 13:26
  • 4
    I see the problem, but am not sure if that's the right way to go about it (since SO would need to know all valid database engine tags for SQL). Maybe we should introduce an option to disallow a certain tag to be used alone, and make a more explicit tooltip pop up if it is used alone. That way, you can also use the functionality for more tags (such as arrays or even regex) where functionality differs per language
    – Erik A
    Sep 12, 2017 at 14:06
  • 13
    Presumably, for those few people who actually mean it, we could have iso-sql.
    – MSalters
    Sep 12, 2017 at 14:46
  • 3
    "Should SO force tagging one of the database engines for questions opened only with the SQL tag?" - I ask myself, how many people would screw up and mix-match MySQL and SQLServer? Probably a lot...
    – Gimby
    Sep 12, 2017 at 15:17
  • 1
    Isn't there a subset of SQL that applies to all, regardless of the actual DBMS? Isn't that the whole point? Sep 12, 2017 at 18:08
  • 4
    I suspect many of the posters don't know it makes a difference. Some might not even know there are other SQL databases at all (new php developers probably haven't seen anything other than MySQL, and new .net developers probably haven't seen anything other than SQL Server). They would assume that "please specify which engine you're using" doesn't apply to them, reasoning that their problem is with the language, not with a particular backend. Better to educate them, but I doubt that would fit in the tiny info box. Without that, I expect forcing a tag would just make them pick at random.
    – Dave
    Sep 12, 2017 at 20:19
  • 2
    And what if a new user or lower rep user is using some esoteric database engine that has no tag? They don't have the reputation to create the tag, but if you disallow them from continuing without selecting an engine tag they'll be forced to intentionally pick an incorrect one. Sep 12, 2017 at 20:21
  • @PeterMortensen I don't know how familiar you are with various SQL dialects, but I can tell you: No. While there is a concept of ANSI SQL, it's often not full-featured enough to cater for common use cases, and many implementations have bugs / quirks which are important enough that users must know how to get around them. That's why all ORMs spend effort detecting which dialect they're connected to. To see how this matters with even the simplest of queries, see: stackoverflow.com/a/595155/1180785
    – Dave
    Sep 12, 2017 at 20:25
  • @Dave Obviously a "first 10" query isn't the simplest possible query. It's simpler without the restriction. ANSI SQL does exist, and banning it as a question topic (which is effectively what this proposal would do) seems extreme.
    – user2404501
    Sep 12, 2017 at 20:46
  • 4
    @WumpusQ.Wumbley we have an ansi-sql tag, that should be one of the allowed database engines. The proposal doesn't ban ANSI SQL at all. You can just use that tag.
    – Erik A
    Sep 12, 2017 at 20:54
  • @WumpusQ.Wumbley sure, in many cases ANSI is enough. But when somebody's asking a question, they can't know that it will be (if for some reason they need a portable ANSI solution, whether it suffices or not is implicitly part of the question, and as Erik says, 'ansi-sql' fills that role). Also I think you misinterpreted "the simplest of queries"; I intended to point out that even queries which seem trivial to newcomers can end up needing dialect-specific answers, rather than "the simplest possible query" (which I guess might be SELECT 1?)
    – Dave
    Sep 12, 2017 at 21:10
  • 1
    @Dave: SELECT 1 is db-specific. SELECT * FROM (VALUES(1)) X([1]); seems to be the smallest portable version.
    – Joshua
    Sep 12, 2017 at 21:21
  • @Joshua wow, the irony of it! :D
    – Dave
    Sep 12, 2017 at 21:27
  • 1
    @Joshua: There are SQL databases for which SELECT * FROM (VALUES(1)) X([1]) does not work. I'm not even sure what it is supposed to do (the X([1]) part of the notation has me bemused), but it doesn't work in Informix (and neither does SELECT 1). If your notation is much more complex than SELECT * FROM SomeTable, you are likely to run into issues somewhere along the line. Sep 13, 2017 at 4:01

0

You must log in to answer this question.

Browse other questions tagged .