You can also use dbConstructor to create your scripts and it will automatically generate the declarative and trigger referential constrain.

Regards,

Robert Allen Schambach...