I've got the following table layouts:
Table Data
+----------+-------------------------+
| Field | Type |
+----------+-------------------------+
| type | enum('type_b','type_a') |
| type_id | int(11) unsigned |
| data | bigint(20) unsigned |
+----------+-------------------------+
Table A and B:
+--------------+------------------+
| Field | Type |
+--------------+------------------+
| id | int(11) unsigned |
| customer_id | int(11) unsigned |
| ... |
+--------------+------------------+
In table Data there is some messurement data from a certain type (a or b).