I am using a MySQL database. In my relational data model, I have two objects that relate to each other 1: 1. In my scheme, the 1: 1 ratio is adjusted by putting the FK field in one of two tables related to the PK of the other table. Both tables have PK, and both of them automatically increment BIGINT.
I am wondering if it is possible to have behavior ON DELETE CASCADEfor them that works in both directions.
i.e. A 1: 1 B means that [deleting A also removes B], as well as [deleting B also removes A].
I understand that this may not be absolutely necessary from the point of view of the correct design of the application, but I'm just wondering if this is really possible. As far as I remember, you cannot put an FK limit on a PC.
source
share