RDOHELP72.HLB  —  DELETE_RELATION, Examples
    Example 1

    Delete a single relation definition:

    RDO> INVOKE DATABASE PATHNAME "PERSONNEL"
    RDO> DELETE RELATION COLLEGES.
    RDO> COMMIT

    This statement deletes the definition for COLLEGES from the
    database file for PERSONNEL and from the data dictionary.

    Example 2

    Delete more than one relation definition:

    RDO> INVOKE DATABASE PATHNAME "PERSONNEL"
    RDO> DELETE RELATION DEGREES, COLLEGES.
    RDO> COMMIT

    This statement deletes both DEGREES and COLLEGES from the
    database file for PERSONNEL and from the data dictionary.

    Example 3

    Delete a single relation and its associated relation-specific
    constraints from the database. In this case, to delete the
    COLLEGES relation, it is necessary first to delete the DEGREES
    relation and the COLLEGE_CODE_CASCADE_UPDATE trigger because the
    COLLEGES relation has constraints that depend on them.

    RDO> INVOKE DATABASE PATHNAME "PERSONNEL"
    RDO> DELETE RELATION COLLEGES.
    %RDB-E-NO_META_UPDATE, metadata update failed
    -RDMS-F-CONEXI, relation COLLEGES is referenced in constraint
    DEGREES_FOREIGN2
    -RDMS-F-RELNOTDEL, relation COLLEGES has not been deleted
    RDO> DELETE CONSTRAINT DEGREES_FOREIGN2.
    %RDB-E-NO_META_UPDATE, metadata update failed
    -RDMS-F-CONDELVIAREL, constraint DEGREES_FOREIGN2 can only be
    deleted by changing or deleting relation DEGREES
    RDO> DELETE RELATION DEGREES.
    RDO> delete relation colleges.
    %RDB-E-NO_META_UPDATE, metadata update failed
    -RDMS-F-TRGEXI, relation COLLEGES is referenced in
    trigger COLLEGE_CODE_CASCADE_UPDATE
    -RDMS-F-RELNOTDEL, relation COLLEGES has not been deleted
    RDO> DELETE TRIGGER COLLEGE_CODE_CASCADE_UPDATE.
    RDO> DELETE RELATION COLLEGES.
    RDO> COMMIT

    This statement deletes the definition for COLLEGES from the
    database file for PERSONNEL and from the data dictionary.
Close Help