title: What's the most efficient way to store sets in a database?
body: <p>I want to store sets in a such a way that I can query for sets that are a superset of, subset of, or intersect with another set.</p>
  
  <p>For example, if my database has the sets { 1, 2, 3 }, { 2, 3, 5 }, { 5, 10, 12} and I query it for:</p>
  
  <ul>
  <li>Sets which are supersets of { 2, 3 } it should give me { 1, 2, 3 }, { 2, 3, 5 }</li>
  <li>Sets which are subsets of { 1, 2, 3, 4 } it should give me { 1, 2, 3 }</li>
  <li>Sets which intersect with { 1, 10, 20 } it should give me { 1, 2, 3 }, { 5, 10, 12}</li>
  </ul>