Our customer advertises products but the product's attributes are vastly different from one another. There are almost as many product "classes" as there are products.
Originally, we created an EAV database where we added and removed attributes for each "class" of product. The whole thing works very well, but the complexity is mind numbing. This is Database #1.
We finally came up with a set of fields common to represent all products (POCOs), moving the "extra" fields to an XML field "catch all". This is Database #2.
Now we have some customers using the old and some customers that will use the new. We really didn't want to update the old until we needed to do so, but we have changes from time to time that simply take longer than necessary because of the EAV structure.
Questions:
- Any examples out there on how to code EF to persist POCOs to an EAV databases (where you have a table of field names and a table of data)?
- Should we just scrap the database and write "normal" tables for all those older customers, given we have changes from time to time?
Normal of course is referring to the Boyce Codd Normal Form.
We handled the older database by bleeding its structure into the software, then mapping to POCOs in the repository.