Writing data

This documentation is not current - it is for TypeDB 2.x, which is no longer supported. View the documentation for TypeDB 3.x:

To modify any data in a TypeDB database, you need to use data session and write transaction. All data queries are validated against the schema of a database.

Unlike schema definition queries, writing data queries are not idempotent. Running the same query twice might result in undesirable results, like duplicating data.

There are only three types of operations that can modify data in a database:

Insert new data.

Delete existing data.

Update existing data.