Developers/Library/Attributes vs properties

From Aimeos documentation

Developers
Other languages:
English 100%


The difference between attributes and properties is rather easy:

  • Attributes can be shared between products and build facets for filtering
  • Properties are not shared and are only available for one product

Examples:

  • "size" is an attribute because the attribute values are used by all clothing products
  • "isbn" is a property because it's only relevant for one book

There might be grey areas where it's not so clear if you should use attributes or properties. Then, prefer properties over attributes if you don't need it to build facets for performance reasons. Attributes are referenced in the mshop_product_list table and so are media, texts, prices, etc. If you have millions of entries in the lists table an only thousands in the mshop_product_property table, then your performance might be lower than in could be due to MySQL selecting sometimes the wrong index.