Schema
Schema definition, types, constraints, migration, and weakening
37 pages
Add a Schema
Define and add a schema to your TerminusDB database using the HTTP API, TypeScript client, or Python client.
Clustering Embeddings
How to enable store_clustering in your schema to generate clustering embeddings for projection, deduplication, and entity resolution
Embeddings Field Guide
How TerminusDB turns schema metadata and documents into embedding text — and the schema details that decide whether indexing works at all
Query Arrays and Sets with WOQL
A guide to show how to query arrays and sets with WOQL in your TerminusDB projects.
Schema CRUD Operations
Create, read, update, and delete schema classes and properties in TerminusDB using the TypeScript client, Python client, or HTTP API.
Schema Queries with WOQL
A guide to show how to query schema with WOQL in your TerminusDB projects.
Subdocument Handling with WOQL
A comprehensive guide to creating, reading, updating, and deleting subdocuments using WOQL queries in TerminusDB.
Use the Model Builder UI
The model builder UI allows you to construct classes of objects and define what data they have, and what links (or relationships) they have between them.
Array fields in the document UI
Examples of how array fields are rendered and managed in the TerminusDB Document UI SDK.
Choice Document in the Document UI
How document choice works in the document UI
Context Cache
How TerminusDB Enterprise Edition caches remote JSON-LD contexts locally using pre-seeded files and a disk-backed HTTP cache.
How to Model Schema
Bit sized how to guides to help you model and build schema for TerminusDB projects.
List Properties in the Document UI
How list properties work in the document UI software development kit.
Mandatory Properties in the Document UI
How mandatory properties work in the document user interface.
One Of for mutually disjoint properties (@oneof)
An example of how one of properties work in the document UI
Optional Properties
How optional properties work in the document UI
Prefix Management API
Learn how to manage namespace prefixes in TerminusDB to simplify your document IRIs and organize your data vocabularies.
Render As Markdown Using @metadata
How to render properties as markdown in the document UI
Schema Migration Reference Guide
Complete reference for schema migration operations in TerminusDB — add fields, rename properties, change types, and re-key documents with worked examples.
Schema Reference Guide
Reference for the TerminusDB schema language: document classes, subdocuments, key strategies (Lexical, Hash, Random, UuidV7), enums and type rules, with JSON.
Set Properties in the Document UI
How to use set properties in the document UI
TerminusDB Data Types
The core data types for TerminusDB, derived from XML Data Types providing strong data interoperability
TerminusDB Document Types Compared
Compare TerminusDB document types - when to use regular documents, subdocuments, and shared documents for different ownership and lifecycle patterns
TerminusDB Document UI SDK - Using Choice Subdocuments
A guide showing how to use multiple choice subdocuments with the TerminusDB Document UI SDK.
XSD Data Types
Comprehensive reference for using XSD data types with RDF and schema.
Ontology Versioning
How to version an ontology or knowledge graph schema, breaking vs non-breaking changes, and how to change a class on a branch and migrate the data.
What is a Knowledge Graph Database?
What is a knowledge graph database? A plain answer, how it differs from a graph database, and how TerminusDB adds a schema, ACID and version control.
What is Schema Weakening
An explanation about schema weakening and why you need it to change a schema which provides constraints and assurances of the shapes of your graph data
Cookbook: Leveraging Arrays with WOQL
Learn to query and manipulate TerminusDB multidimensional arrays using WOQL patterns for efficient data access and processing
Schema Validation Errors — TerminusDB Troubleshooting
Diagnose and fix schema validation errors in TerminusDB including type mismatches on insert, missing required fields, class not found, and enum validation failures.
TerminusDB 11.0.0: Typed Storage Backend and Migration
TerminusDB 11.0.0 moves storage to typed XSD files and layer archives, so data files are smaller and typed. A one-time migration tool is required.
TerminusDB 11.0.6: Automatic Schema Migrations
TerminusDB 11.0.6 lets you migrate data automatically when the schema changes, so class updates carry existing documents along. Also: paged diffs.
TerminusDB 11.1.1: Multiple Inheritance for Properties
TerminusDB 11.1.1 lets classes inherit properties from several parents, so reuse needs no duplication. Also: a docker-compose deployment with VectorLink.
TerminusDB 12.0.4: Fast Range Queries and Interval Algebra
TerminusDB 12.0.4 lets you run fast triple range queries and Allen interval algebra on ISO 8601 times, so time-aware queries need less code.
TerminusDB 12.0.6: Shared Documents and Handlebars Text Rendering
TerminusDB 12.0.6 lets you share documents between parents with @shared and cascade-delete them, so linked records clean themselves up. Also: Handlebars.
TerminusDB 12.0.8: UUID v7 Keys and 4.6× Faster Raw JSON Loading
TerminusDB 12.0.8 lets you use UUID v7 document keys, so you can keep IDs issued by other systems. Raw JSON loads about 4.6× faster than before.
Troubleshooting Document ID Migration
How to fix subdocument ID prefix mismatches after schema changes using the ChangeKey migration operation.