pot_del_country(N,C,Cap,CapP,A,Pop) :- ext_del_country(N,C,Cap,CapP,A,Pop),
        country(N,C,Cap,CapP,A,Pop).
% Province(Country) refs Country(code) on delete cascade
pot_del_province(P,C,PPop,PA,PCap,PCapProv) :- pot_del_country(N,C,Cap,CapP,A,Pop),
        province(P,C,PPop,PA,PCap,PCapProv).
% City(Country) refs Country(code) on delete cascade
pot_del_city(CN,C,P,CPop,Lat,Long,El) :-
    pot_del_country(N,C,Cap,CapP,A,Pop),
    city(CN,C,P,CPop,Lat,Long,El).
% City(Country,Province) refs Province(name,country) on delete no action <<<<<<<<
blk_del_province(P,C,PPop,PA,PCap,PCapProv) :-
  pot_del_province(P,C,PPop,PA,PCap,PCapProv),
  city(CN,C,P,CPop,Lat,Long,El), rem_city(CN,C,P,CPop,Lat,Long,El).
rem_city(CN,C,P,CPop,Lat,Long,El) :- city(CN,C,P,CPop,Lat,Long,El),
                              not del_city(CN,C,P,CPop,Lat,Long,El).
