On this page: The types of documents available in TerminusDB with examples of their definitions and interactions.
@idis unambiguous, for example, when used in the same collection, then
@idcan be used as-is, i.e., as
Player/George. Otherwise, the
@baseproperty is required.
@id. The parameters
@baseare available in the class definition, enabling you to use a calculated
@id. Refer to the Schema reference for more information.
Setproperty in the code-snippet is a type family allowing us to state that the
playerproperty can have any number of
Setdoes not provide ordering or multiplicity; a
Playeris either connected or not connected. For ordering and multiplicity, use
Rosterpoints to the various
Playerdocuments. When requesting the document
Roster/Wolves, each player in the
playerarray is retrieved. Each identifier can be queried in a similar way to retrieve all associated documents.
Statsis declared a subdocument using the
@subdocumentproperty and the special value
. Also, it has a
Randomkey, meaning the key is automatically generated if not provided.
Playerobject. It is also possible for subdocuments to point recursively to other subdocuments or documents.