Previous Topic: ASSOCIATE EntitiesNext Topic: TRANSFER Relationships


DISASSOCIATE Entities

You can DISASSOCIATE entities whose relationships have been designated as optional. You cannot DISASSOCIATE an identifying relationship.

The DISASSOCIATE action breaks a specific pairing along a specific relationship. In the example below, the relationship between PRODUCT and WAREHOUSE in the Data Model still exists but the pairing does not.

DISASSOCIATE can appear as a clause in an UPDATE action statement. The following UPDATE statement shows an example of a DISASSOCIATE action:

UPDATE received product
SET number_delivered TO input product number_delivered
DISASSOCIATE FROM warehouse WHICH can hold IT

DISASSOCIATE can also appear as a standalone relationship action. It operates the same as the relationship clauses in the CREATE and UPDATE, with one exception: in relationship clauses, the subject of the clause is always the subject of the entity action. In a standalone relationship action, you explicitly specify the subject of the action.

The following statement shows an example of a standalone DISASSOCIATE action.

DISASSOCIATE received product
FROM order_line WHICH contains IT

In the previous example, received product is deleted if its relationship to order_line is mandatory and has a cardinality of one. In addition, any product components dependent on that occurrence of PRODUCT are deleted.