I have a series of tables, that have been simplified into the scheme pictured below.
The objects table contains data about a given object, and has a lot of useful data in it. But, because we may want to track additional and varied data, we have the other three tables, which include optional data for that object.
So, let's assume the "object" is a shopping cart item: T-Shirt. The manufacturer and other data would be in the object table. But, because "T-Shirt" can have many designs, we would store the design, size, colors, etc... in the key / value tables, and then associate them to the "object" table using the data table.
So, here's the quandary.
I want to query some specific information about A particular T-shirt that has a particular size and design. In order to do that, I need to run three queries: two that get the key / value pairs for an object that has an object id = x where height is one key and width is another key. Then another query for the object that has an id of x. If I try to do this as a subquery, MySQL complains that the subquery returned multiple rows. I can fix the multiple row problem by supplying objects_id = 14 to the subquery, but that's stupid because I would return the width and height for object #14 for all objects.
I am sure this question is clear as mud, so if I have made it more complicated than it should be, please call me out on that.
Thanks in advance,
So, in order to get the values I want