Hi.
If I have a table
country (id int Primary key, president bigint references people);
and a table
people (id bigint, country_id int not null references country );
and now I want to enforce that there is a president in each country by
adding a not null constraint on the column presient in the country
table.
Is there a way to do that? just adding the not null, will that not
get me into a chicken-egg situation where I can not add a country
without adding a president to the people table, which requires a
country... and so on.
So how would you insert the rows?
Or are there other ways to do this without creating a new table to
contain the presidents?