title: What is the data model used for tags and tag synonyms?
body: <p>I <a href="https://meta.stackexchange.com/questions/104430/what-is-the-data-model-of-tag-synonyms">asked this question on meta</a>, but i now realize that it may be more appropriate for the main site as it is a general question that would relate to any tagging based system (i am happy to close / delete one depending on where people think this question should go)</p>
  
  <hr>
  
  <p>i have a similar system of tagged data and i am running into the same problem as SOF did where i have lots of tags that are really the same thing. I am trying to create a tag synonym page similar to SOF to support organizing this information.</p>
  
  <p>A few questions around the relationships and "data model" of tag synonyms:</p>
  
  <p>I assume that a master tag can have multiple synonym tags but a synonym tag can only be a 
  synonym for one master tag. Is that correct?</p>
  
  <p>Also, can a master tag also be a synonym tag? For example, lets say you have a tag called javascript and you had:</p>
  
  <p><strong>Master</strong>: js<br>
  <strong>Synonyms</strong>: java-script, js-web  </p>
  
  <p>can you also have:</p>
  
  <p><strong>Master</strong>: javascript<br>
  <strong>Synonyms</strong>: js  </p>
  
  <p>So in the example above, you would keep resolving to ultimately resolve <strong>js-web</strong> to <strong>javascript</strong> because the master tag: <strong>js</strong> is itself a synonym tag.</p>
  
  <p>Also, that makes me think you could also run into a circular reference where you have a</p>
  
  <p><strong>Master</strong>: js<br>
  <strong>Synonyms</strong>: java-script  </p>
  
  <p>and</p>
  
  <p><strong>Master</strong>: javascript<br>
  <strong>Synonyms</strong>: js  </p>
  
  <p>How does the system deal with circular refernces?</p>