Your requirements are fighting each other.
- Cascade delete is from principal to dependent, so when an
Address
should be deleted when anEvent
is, theEvent
must be the principal (the entity to which a foreign refers). - If more than one class must have an
Address
, the other classes should refer toAddress
, which makesAddress
the principal.
There is an alternative. Address
could have two foreign keys, to Person
and to Event
. But this is not very appealing, because the keys must both be nullable and there is no database constraint to enforce that they are mutually exclusive.
Another alternative is to make Address
a complex type, so both the Event
and the Person
tables will have all address columns. Of course this is not well normalized, and you can't handle Addresses
as separate entities, but at least there is no cascade issue, because an address is part of the Event
record.
I think your best option is to have several classes refer to Address
and write logic to delete orphan addresses.