Does anyone know of any libraries which implement an abstraction in LINQ over the Entity Attribute Value (EAV) pattern? I have a large legacy EAV database and I'm trying to create a cleaner data access layer and the thought of using LINQ really appeals so I'm looking for any code I can use to jumpstart.
EAV (Entity-attribute-value) is a model of storing the values of entity attributes in a certain data storage. As a data storage, Magento 2 supports MySQL-compatible databases (like MySQL, MySQL NDB Cluster, MariaDB, Percona and others).
EAV vs row modelling Entity-Attribute-Value design is a generalisation of row modelling. It means that all types of facts are recorded in a single table across the entire database, where a row-modelled table is homogeneous in the facts that it describes.
Entity–attribute–value model (EAV) is a data model to encode, in a space-efficient manner, entities where the number of attributes (properties, parameters) that can be used to describe them is potentially vast, but the number that will actually apply to a given entity is relatively modest.
In relational databases, attributes are the describing characteristics or properties that define all items pertaining to a certain category applied to all cells of a column. The rows, instead, are called tuples, and represent data sets applied to a single entity to uniquely identify each item.
Having been involved in several LINQ providers, I can say there's no LINQ abstractions for EAV that I'm aware of. I think you're SOL.
I know you said you've inherited an existing EAV database, but if you have an option to use something else, perhaps this post will sway you away from EAV. :-)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With