title: EAV - in an ecommerce case, is it really an anti-pattern?
body: <p>I'm in the process of building a new system which will require an extendable data model. It's quite complex, but the part of the system which requires this structure is very relatable to the product part of an ecommerce system, so I'll use that as a case. </p>
  
  <p>Imagine a set of companies. Each company has a range of products, which has some basic attributes such as <code>name</code>, <code>sku</code>, <code>description</code>, <code>price</code> etc. Alongside these basic attributes, the company should be able to create <code>n</code> custom product attributes, which belongs to the company (i.e. <strong>Foo Corp.</strong> shouldn't be able to see <strong>Acme Inc.'s</strong> custom attributes). Beside that, each company should be able to translate these attributes for each product; so each custom attribute value is basically constructed from an <code>attribute</code>, a <code>product</code>, <code>language</code> and a <code>value</code>.</p>
  
  <p>I do understand that the EAV structure is an anti-pattern if you store an fixed amount of attributes and the one in need of extending the amount of attributes isn't the owner of the system. </p>
  
  <p>So my question is - how would you achieve this? It the EAV structure really an anti pattern in this case? Magento is a classic example of someone using this design, and it kinda seems like they built a monster and had to 'fix' it by implementing flat index tables. But are there any other database design pattern that allows for this amount of flexibility?</p>