In my application I have an entity, table, called actions with varied properties. To clarify the case, the following is the table actions structure:
- id,
- status_id(not null),
- section_id(not null),
- job_id (not null)
- equipment_id (null),
- cause_id (null),
- solution_id (null),
- created_at,
- closed_at,
- action_type (not null) char(3)
Where all fields suffixed with _id are foreign keys and the action_type is very limited and defined list of actions types, so I defined it in a configuration file i.e there is no database entity for action_type.
My question is more general than this one: Can a foreign key be NULL and/or duplicate? where I'm asking about normalization principal.
In my case, some action types has no need, for example, for equipment_id, where others need equipment_id but not need both cause_id and solution_id, etc
In my database design, the actions table looks like Many to Many conjugation table.
The above design allows, easily, to get many statistics data about sections and jobs without need to perform complex join queries.
My question is: Does my normalization and design correct?