When you create foreign key constraints with Access (through database schema editor), you have a choice to enable or disable the following options (actual captions may differ, I only have localized version of Access available):
x Enforce data integrity
x Cascade updates
x Cascade deletions
In DDL, the latter two can be represented with:
ADD CONSTRAINT Constraint1
FOREIGN KEY (Field1)
REFERENCES Table2 (Table2Field1)
ON UPDATE CASCADE
ON DELETE CASCADE
But how do you simulate the case where none of the checkboxes are on, not even the "enforce integrity"?
Simply dropping "ON UPDATE/ON DELETE" clauses still produces the equivalent of "enforce integrity" constraint (and consequently requires that Field1 and Table2Field1 had indexes).
I think you are confusing an Access 'Relationship' with a ACE/Jet FOREIGN KEY
.
In general, you can't use SQL DDL to create Access objects (even if those objects are persisted in ACE/Jet tables). Another example is Validation Rules but you can create CHECK
constraints using SQL DDL (in fact cannot be created any other way) which are more powerful (e.g. can be more than one per table, can reference other rows within the same table or in other tables, etc), yet Validation Rules show up in the adSchemaTableConstraints schema VIEW with CONSTRAINT_TYPE = 'CHECK'.