Presented by

  • Mark Wong

    Mark Wong

    Mark Wong is currently employed by EDB and is a PostgreSQL Major Contributor. His background is in database systems solutions and performance. He has contributed to various aspects of the community such as a benchmarking kits, Google Summer of Code mentor, PGConf.US Organizer, Portland PostgreSQL Users Group Co-Organizer, PostgreSQL Fundraising Group Member, and Treasurer and President of PgUS.

Abstract

This is a tale about one company's experience with a database schema design refactor to use the Entity-Attribute-Value (EAV) data model on its members. I will describe the original data model and why there was a need to move to a new data model, which the EAV was chosen for. This decision was made without realizing that the EAV data model is considered an anti-pattern for relational data modeling. There was some stumbling along the way but the company recovered and succeeded in implementing the EAV data model with some on-the-fly data transformation. The moral of the story really is to not use the EAV data model, but changing the data models is not always trivial. Hopefully this story can still help make the EAV data model bearable for the short term.