I must design a database that store items that can be associated to a production. Production is only a identifier with no common attributes. But, a production may or may not have attributes (which are heterogeneous according to the production).
If I use a 3 tables design, I can put a foreign key on the prod_id of the Item and ProductionData tables, but I cannot see the value of it. Is there any ?
If I skip the table, I got 2 independent tables linked artificially by a prod_id, so 2 independent process can manage them.
OPTION #1
--------------- --------------- ----------------------
|Item | |Production | |ProductionData |
|id (pk) | |prod_id (pk) | <--- |prod_id (fk,ak1.1) |
|... | | | |attribute (ak1.2) |
|prod_id (fk) | ---> | | |value |
--------------- --------------- ----------------------
OR
OPTION #2
---------- --------------------
|Item | |ProductionData |
|id (pk) | |prod_id (ak1.1) |
|... | |attribute (ak1.2) |
|prod_id | |value |
---------- --------------------
Am I missing something or option #2 is a better option ?