alter table Z
add constraint Z2 foreign key (a) references X(a);
alter table Z
add constraint Z2 foreign key (c) references X(a);
alter table Z
add constraint Z2 foreign key (e) references X;
alter table Z
add constraint Z2 foreign key (a,c) references X, Y;
alter table Z
add constraint Z2 foreign key (c) references X (b);