This one is trickier to do in SQL. If this were Rails, I'd say to use single table inheritance.
The entities are participant, swimmer, and runner tables, correct? And each participant can do only one activity.
One possibility:
- To participant, add type field (limited to swimmer and runner either as an enum, or with a reference table).
- To the swimmer and runner tables, add a constraint each that the participant_ID must have the corresponding type.
- To participant, add a before update trigger that deletes the child swimmer or runner record if the type changes.