WooCommerce makes use of the standard WordPress SQL tables for both products and product variations. In the posts table, products are stored with the post_type of “product” and each variation for the product has a post_type of “product_variation”. The product variation has a post_parent set to the ID of the product it is related to. So, a product with the ID of 123 that has 5 variations will have 5 entries in the posts table, each with a post_parent of 123 and a post_type of “product_variation”.
Details about the variations are stored in the postmeta table. Each item in the postmeta table that relates to a variation will have a post_id that points back to that variation. This includes things like attribute name, price, sale price, weight, etc.
The list of attributes that you entered are stored as serialized data for the meta_key “_product_attributes”. This item will have a post_id that points back to the product. In our example, it would contain 123. Default attributes are also stored as serialized data. The meta_key for default attributes is “_default_attributes” and it too contains the post_id for the product.