When defining mutual relationships, one of the tables' referential integrity constraints may be to a yet undefined table. It may be impossible to re-order the declarations. Allowing a stand-alone referential constraint would make it possible to defer the constraint declaration until after the target table is declared. The attached patch implements this construct:
Table Magazine
Field title
Field winner
Constraint winner references Reader(name) --forbidden
Table Reader
Field name
Field favorite
Constraint favorite references Magazine(title)
Reference name="Magazine" foreign-key="winner" ref-table="Reader" ref-key="name"
Table Subscription
Field name
Field title
Constraint name references Reader(id)
Constraint title references Magazine(id)
There would need to be a corresponding change to dbsdl-xhtml.xsl.
Allows stand-alone referential integrity constraints.