We should check that Ehe- and Einstandspartner specified via p_id_ehepartner and p_id_einstandspartner are consistent. Two people can be Einstandspartner, but not Ehepartner. The other way around is not possible, i.e. the following is okay:
p_id |
p_id_ehepartner |
p_id_einstandspartner |
| 0 |
-1 |
1 |
| 1 |
-1 |
0 |
| 2 |
-1 |
-1 |
But this is not:
p_id |
p_id_ehepartner |
p_id_einstandspartner |
| 0 |
1 |
-1 |
| 1 |
0 |
-1 |
| 2 |
-1 |
-1 |
and also not:
p_id |
p_id_ehepartner |
p_id_einstandspartner |
| 0 |
1 |
-1 |
| 1 |
0 |
0 |
| 2 |
-1 |
1 |
Also, children should not be married to their parents and the like.