30

I recently posted a question where I was having a problem writing some SQL for a problem I was trying to solve. When I finished writing it I added the tag as well as the one for the database product I'm using. To help the question get some more views, from more experts, I also added some tags for other database products too. I hoped that people who use those could help me too.

Shortly after I posted the question though someone told me to not "spam" the tags, as it makes the question confusing and to only tag the RDBMS that I'm actually using. They also edited my question and removed all the tags apart from . Why is tagging the other products not helpful, when it enables more people to answer the question? Why would they remove the tags that I added?

This is intended to be written in an FAQ style.

2 Answers 2

39

For those of you who don't have time to read the entire post

The purpose of "tagging your database" is to identify your specific technology, so that experts in that technology can answer your specific question. Using multiple database tags causes several problems, described in detail below. Adding tags just to "get more views" is never a good idea. Avoid these problems; use one tag to identify the specific RDBMS you are using.


Why you should not use multiple RDBMS tags

When posting a question for , tagging your (R)DBMS is important; there's another topic on why which you can read here: Why should I "tag my RDBMS"?.

Tagging multiple different (R)DBMS products, however, makes your question about as unclear as if you hadn't tagged them at all (and had just tagged ). As the linked question states, every product uses a different dialect, which means it's important for us to know which one you are using. If we don't know what dialect you are using, and you've tagged multiple different ones, you may get a solution in a dialect of SQL that you can't use. For example, if you tagged both and , and you are using Oracle, you might end up with an answer that uses Transact-SQL (SQL Server's dialect), which is very unlikely to work on your Oracle instance.

Subject Matter Experts (SMEs) will often "watch" the tags that they are experts in. If you tag multiple products, you could actually therefore deter those users, as they see the product they are an expert in tagged, but also a product that they have no experience in tagged as well and so will ignore the question. The tags tell other users what the question is about, so if you tag both and , you are telling other users that you are asking about both MySQL and PostgreSQL. As such, if someone isn't fluent in both technologies then it's unlikely they can answer the question. If you tag 3 or even 4 different products you are significantly limiting the number of users who can help you, as you're stating that someone should be familiar with all of the products, which is likely to be a very small subset of the user base.

Tagging multiple products can attract downvotes and/or close votes too. If a user reads your question only to find out it has nothing to do with the product you have tagged, this can be interpreted by that user as the question isn't helpful. The question isn't about the product you tagged, and so for users interested in that product, who might be searching for an answer too, you've (in effect) wasted their time, as there's nothing useful/helpful for them as they can't contribute or use the content in that question. Users with the privilege to close may well vote to close the question as unclear, as if it's unclear what SQL Dialect the question needs an answer in then it's not easily answerable as any attempts could be wrong.

You also should not expect that these users should be able to write an answer in a version of SQL that is agnostic to the data engine. Though there is an [], it is very rare that anything other than the most simple of queries are transferable between different products. Every single one has nuances, has different implementations of the ANSI/ISO rules, and what is(n't) implemented can be different between version to version of the same product.


As for why the user removed the tags, one reason could be to stop wrong answers. Like mentioned earlier, you could get answers in the wrong dialect for the product you are using, and if we don't know what product that is (and we're being told multiple different ones), then the chance of an answer in the wrong dialect being provided is much higher. As a result, removing the tags removes the uncertainty until such time that you clarify what product you are using, ideally by editing your question to (re)tag the (R)DBMS you are actually asking about.


This is not to say that you should never tag multiple (R)DBMS products; however, you should only do this when you really are asking about both products. ETL processes, for example, might be a common time when such tags are appropriate.

If you are asking for help on "translating" from one dialect to the other, tag the product you are translating to, not from. Include the original code, from the other product, but take the time to explain what that code does, and specifically the part you are having difficulty translating. This means that even someone who doesn't know the other dialect can still help you, as they can explain how to achieve the goal from the explanation.

3
  • 1
    What tags do you expect when writing SQL that needs to run on more than one RDBMS?
    – Joshua
    Commented Feb 23, 2023 at 22:57
  • 1
    I mention [ansi-sql] in the answer, @Joshua . In truth, however, you don't for the reasons stated above; the dialects are all different and even the most basic of ANSI-SQL statements might not be transferable (which I also state). If someone is looking for solutions in different products, they would be best asking multiple questions.
    – Thom A
    Commented Feb 24, 2023 at 9:09
  • 1
    There is, actually, also [database-agnostic] @Joshua ; though it has very few question (less than 100 at the time of posting). So someone could tag [sql] and [database-agnostic] to denote that they want SQL that will (hopefully) run on any database. Not sure if to add that in the answer, however, as it does have so few questions at this time.
    – Thom A
    Commented Feb 28, 2023 at 15:40
3

TL;DR / Short version of @Larnu's FAQ answer:

Only tag your question with + the tag for your specific (R)DBMS.

If you were directed to this thread, that may be because you did not read the tag wiki nor the tag wiki for the (R)DBMS you are actually using. The excerpt and wiki of a tag give guidance on how to use those tags; make sure to read both when selecting tags when you write a question.

Adding extra (R)DBMS tags to try to get a broader audience to get an answer to your question is not a good idea. The question may receive downvotes from people following those extra tags, checking your question thinking they could answer it, or even close votes because your question will "lack focus".

Different (R)DBMS's use a different dialect of SQL and solutions/scripts are often specific to only a particular vendor. So there should only rarely be a reason to tag multiple at once.

1
  • 1
    I changed the text to be more neutral. I'm very much on the fence about the reason given for tagging multiple DBMS's because that's only one of several possibilities. It is probably a little too forward.
    – Gimby
    Commented Feb 23, 2023 at 9:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .