• Mark Horninger (5/19/2008)


    Seems like the 'right' answer is to redesign the DB.

    Having inherited designs like this most likely the reason for the design is to provided the flexibility to add new attributes without re-coding.

    Has anyone considered using an xml based approach to replace the E-A-V model?

    Designs similar to this are common in applications that allow customizable metadata on stored objects.

    I have indeed seen the XML tried for this - all looks very neat (and the developer gets to play with nice new XML features in modern DBs...) until you actually try and query anything. If you thought the performance would be bad with the type of queries you need against this sort of design, think an order-of-magnitude worse for XML. By all means try it for your app, but profile it early and convince yourself on the performance before you waste several weeks on the approach...