I think that the orders_products_attributes table might form part of an answer to your question. But it is rather difficult to follow precisely what you're asking.