4 Updatable JSON-Relational Duality Views
Applications can update JSON documents supported by a duality view, if you define the view as updatable. You can specify which kinds of updating operations (update, insertion, and deletion) are allowed, for which document fields, how/when, and by whom. You can also specify which fields participate in ETAG hash values.
A duality view does not, itself, store any data; all of the data that underlies its supported JSON documents (which are generated) is stored in tables underlying the view. But it's often handy to think of that table data as being stored in the view. Similarly, for a duality view to be updatable means that you can update some or all of the data in its tables, and so you can update some or all of the fields in its supported documents.
An application can update a complete document, replacing the existing document. Or it can update only particular fields, in place.
An application can optionally cause an update to be performed on a document only if the document has not been changed from some earlier state — for example, it's unchanged since it was last retrieved from the database.
An application can optionally cause some actions to be performed automatically after an update, using database triggers.
_________________________________________________________
- Annotations (NO)UPDATE, (NO)INSERT, (NO)DELETE, To Allow/Disallow Updating Operations
KeywordUPDATE
means that the annotated data can be updated. KeywordsINSERT
andDELETE
mean that the fields/columns covered by the annotation can be inserted or deleted, respectively. - Annotation (NO)CHECK, To Include/Exclude Fields for ETAG Calculation
You declaratively specify the document parts to use for checking the state/version of a document when performing an updating operation, by annotating the definition of the duality view that supports such a document. - Database Privileges Needed for Duality-View Updating Operations
The kinds of operations an application can perform on the data in a given duality view depend on the database privileges accorded the view owner and the database user (database schema) with which the application connects to the database. - Rules for Updating Duality Views
When updating documents supported by a duality view, some rules must be respected.