add many tables or create parent table
I have 7 tables. Each table represents transmission type where each row in table represents the Trasmission.
These are the tables:
Some of the tables have task_reference_id field and some of them doesn't have.
This means that one task can referenced by many tables. No I have to change this structure: Each transmission table with task_reference开发者_StackOverflow中文版_id field should reference to many tasks references. This means that I need to add 5 tables with fields: task_id, transmission_id that will hold the tasks references. But this makes me think, instead of adding 5 new tables maybe I can create parent "Transmission" table that all other tables will "inherit" from (primary key will be foreing key in the parent table). And such it will take only one table to make references to tasks. This table will have base_transmission_id, task_id field.What do you think? What will be better: add 5 tables or change the structure with parent table so I will have to add only 1 table in order to reference the tasks?
I would go for supertype/subtype, here are few examples.
精彩评论