Suboptimal Solutions

Let’s learn methods to avoid EAV that can be used where inheritance methods cannot be used.

We'll cover the following

There are two more solutions to model the subtypes that we are going to discuss in this lesson. These are:

  • Semistructured data
  • Post-processing

Semistructured data

If we have many subtypes or if we have to support new attributes frequently, we can add a BLOBbinary large object column to store data in a format, such as XML or JSON, which encodes both the attribute names and their values. All database brands support the BLOB data type, which we can use to store any binary data. Martin Fowler calls this pattern the Serialized LOB.

Get hands-on with 1400+ tech skills courses.