Woo: Relational in Name Only

My idea for StoreBoss™ came out of running my wife’s Woocommerce estore for 5 years.

In case you didn’t already know this: Woo uses a hybrid quasi-relational / EVA data model. It is implemented on top of WP’s underlying, equally non-relational meta schema, which can run atop MySQL or MariaDB, typically using the InnoDB engine.

The WP data model was designed initially to provide data persistence to an early CMS system. It allowed the addition of n-number of attributes to a post entity type, as needs evolved, and without knowing in advance what these might be.

At its core,  the WP data model consists of rows  in a centrally important table that can be joined via a SELECT statement to a vertically structured (i.e., “thin”) table which specifies whatever attributes (instantiated as rows) WP would need, as time went by, for its post and, later, page types.

This has MAJOR performance implications.

Also, partly because of WP’s flexible,”meta” structure, Woo does not make “normal” usage of Primary and Foreign relationships — business rules are implemented via PHP code. This leads to issues — with WP and Woo’s feverish update schedule a sign of these.

Moreover, Woo uses serialization, which makes some of its content non portable and undoubtedly violates one of the relational model’s 12 rules, though you have me as to which one that might be.

Advertisements