0

Is it necessary to follow EAV with the models I create for my modules? If not always, when should I and when shouldn't I?

user2045
  • 831
  • 3
  • 16
  • 29

1 Answers1

3

No it is not necessary, especially if you're using your own tables and your own schema for data storage; and that schema is fixed (not end-user-defined).

EAV was used as the basis of Customer, Products (and, once upon a time, Sales) because the schema (business needs) for every install of Magento is potentially different - e.g. some may want to gather a customer's Pet Name during registration, while others would want a product attribute called Flavor.

In short, define your application's scope and the data storage schema - then use Magento's built-in Resource models (ORM) to provide access and CRUD capabilities.

philwinkle
  • 35,751
  • 5
  • 91
  • 145