Documentation Home
MySQL 9.4 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 41.2Mb
PDF (A4) - 41.3Mb
Man Pages (TGZ) - 262.8Kb
Man Pages (Zip) - 368.8Kb
Info (Gzip) - 4.1Mb
Info (Zip) - 4.1Mb


27.7.2.2 Requirements for Table Annotations

Requirements for Insert Annotations

The root object and sub-objects of a document must have the INSERT annotation. Any referenced sub-objects must in fact exist. Otherwise the insert operation is rejected with an error.

If a sub-object is updated as part of an insert operation, this sub-object must have the UPDATE annotation. Exception: If a given sub-object already exists and is referenced in the object being inserted or updated, no annotation check is performed.

Requirements for Update Annotations

Update operations on the root object and its sub-objects require the UPDATE annotation, and are rejected with an error without it. Referenced sub-objects must in fact exist.

If a sub-object is inserted as part of an update operation, then the object must have the INSERT annotation. Otherwise, the operation is rejected with an error with the following exceptions:

If a sub-object already exists and is referenced in the object being updated, or if it would be replaced with another, existing sub-object in the table, no check for annotations is performed.

If a sub-object is modified and the UPDATE annotation is not specified, only the existence of the sub-object is checked. It should not report an error for missing annotation.

If a sub-object is a descendant of an element that is deleted, then the sub-object must have a DELETE annotation; otherwise, the operation is rejected with an error.

Requirements for Delete Annotations

If root object must be deleted, then an object of a document must have a DELETE annotations.

FR3.3.1.1: If DELETE annotation is not specified, then an error must be reported.

FR3.3.2: A singleton sub-object must not be deleted.

FR3.3.3: Nested sub-object must not be deleted if DELETE annotation is not specified.

FR3.3.3.1: If sub-object has DELETE annotation, then all elements of nested sub-object must be deleted. 4. Requirement for Sub-statement Generation.

Note: It is assumed that objects have required Table level annotations here.