As we all know, a design pattern that is used frequently in WordPress' DB code is the idea of persisting data for a particular object (blog/post/comment), indexed with a particular name or key.
We see this pattern used in the following standard tables:
- wp_options
- wp_commentmeta
- wp_postmeta
As far as I can tell, the motivation for this design decision was to enable plugin/theme authors to persist data easily (e.g. by using custom fields) without having to modify the database schema. It would seem to me that there are few other advantages to this approach, since it is significantly slower and makes it harder to implement complex queries.
What are the other advantages to this approach, if any?
UPDATE: Reading info on the drawbacks of this approach: