Subject cascading delete
Author duilio_fos
1. say you have 3 tables:

create table Worlds (
World_ID integer,
primary key World_ID
)

create table Planets (
World_ID integer,
Planet_ID integer
)

ALTER TABLE Planets ADD FOREIGN KEY (World_ID) REFERENCES
Worlds (World_ID) on delete cascade


create table Stars (
World_ID integer,
Star_ID integer
)

ALTER TABLE Stars ADD FOREIGN KEY (World_ID) REFERENCES
Worlds (World_ID) on delete cascade

2. say you issue the command

delete from Worlds

Does FB deletes first Planets or Stars ?

Is the sequence unpredictable ?

If Planets and Stars are correlated, does FB any smart guess about
the optimal sequence ?

Thank you

Duilio Foschi