there is a not null constraint that is deferrable
there is a foreign key constraint that is deferrable
there are two separate constraints on p.cid
and if you comment out the not null deferrable bit:
ops$tkyte@ORA9IR2> create table p
2 ( id number primary key,
3 cid number not null -- deferrable initially deferred
4 )
5 /
Table created.
you get a different end result:
ops$tkyte@ORA9IR2> insert into p values ( p_seq.nextval, null );
insert into p values ( p_seq.nextval, null )
*
ERROR at line 1:
ORA-01400: cannot insert NULL into ("OPS$TKYTE"."P"."CID")
the goal here was to enforce a 1:1 mandatory relationship.
In order for that to happen the foreign keys must be NOT NULL
But then it would be very hard to create a record in either table! So, at least one of the foreign keys needs to be NOT NULL DEFERRABLE in order to allow this to happen in a two step fashion easily.