title: RDBMS Entity with many predefined attributes
body: <p>I have following abstracted model in my application.</p>
  <pre><code>Entity &quot;Product&quot;
  Id | Name | Attribute 1 | Attribute 2 | ... | Attribute N = 50
  </code></pre>
  <p>Attributes are fixed by a business model and can only have specific, predefined characteristics, i.e.:</p>
  <pre><code>Attribute 1
  1 | Blue
  2 | Red
  3 | Yellow
  
  Attribute 2 
  1 | S
  2 | M
  3 | L
  </code></pre>
  <p>Referencing these attributes by a one-to-many or many-to-many would make sense, if I would only have a hand full of so defined attributes... However, we have a lot of these attributes, lets say N=50 predefined, specific attributes.</p>
  <p>That would mean a query must perform N=50 joins to receive the entire product from database. That does not seem like a well-performing, well-scaling approach, especially when increasing the amount of products (several tens of thousands).</p>
  <p>In a NoSQL database like MongoDB I would design it probably like as including the references directly in the same document:</p>
  <pre><code>{
      &quot;Id&quot;:&quot;1&quot;
      &quot;name&quot;:&quot;somename&quot;
      &quot;attributes&quot;: {
          &quot;attribute1&quot;:{&quot;1&quot;:&quot;red&quot;}
          &quot;attribute2&quot;:{&quot;1&quot;:&quot;S&quot;}
          ...
          &quot;attribute50&quot;:{&quot;1&quot;:&quot;something&quot;}
      }
  }
  </code></pre>
  <p>But for SQL and RDBMS im kind of stuck or can't find a proper solution.</p>