Database Properties for Category to Child and Relationship shapes (Referential Action)
Use these options to determine the effect on the child table when information in the parent table is updated or deleted.
You can make exceptions to the general referential integrity policies you have set for the database at large. The options you set affect only the selected relationship. Microsoft Office Visio automatically generates referential integrity constraints between related tables using the settings you define.
On parent update
No action
Select to make no automatic changes to the foreign key when the parent in the selected relationship is updated. This is the default.
When you update the model, the target database does not attempt an update that violates the relationship between these two tables.
This type of referential integrity is also called RESTRICTED.
Cascade
Select to make the same changes to the foreign key as are made to the primary key when the parent in the selected relationship is updated.
Set NULL
Select to set the entire foreign key to NULL when the parent in the selected relationship is updated.
When an update to the parent table of this relationship changes the value in the parent column, the value of this child column will be set to NULL.
Use this option to prevent a new parent value from applying automatically to all child cases.
This type of referential integrity is also called NULLIFIES.
Set default
Select to set the entire foreign key to the default value when the parent in the selected relationship is updated.
When an update to the parent table of this relationship changes the value in the parent column, the value of this child column will be set to the default value.
Use this option to prevent a new parent value from applying automatically to all child cases.
Note: You may select this option for columns that allow NULL values but do not have a default value specified because NULL is considered to be an unspecified default value.
Do not enforce
Select to disable referential integrity when the parent in the selected relationship is updated.
On parent delete
No action
Select to make no automatic changes to the foreign key when the parent in the selected relationship is deleted. This is the default.
This type of referential integrity is also called RESTRICTED.
Cascade
Select to make the same changes to the foreign key as are made to the primary key when the parent in the selected relationship is deleted.
Set NULL
Select to set all foreign key columns in matching rows to NULL when the parent in the selected relationship is deleted.
This type of referential integrity is also called NULLIFIES.
Set default
Select to set all foreign key columns in matching rows to the default value when the parent in the selected relationship is deleted.
Note: You may select this option for columns that allow NULL values but do not have a default value specified because NULL is considered to be an unspecified default value.
Do not enforce
Select to disable referential integrity when the parent in the selected relationship is deleted.
No comments:
Post a Comment