Officially out now: The TypeDB 3.0 Roadmap >>

owns statement

The statement <LABEL> owns <ATTRIBUTE LABEL> is used to identify the <LABEL> type as an owner of <ATTRIBUTE LABEL>.

Defining ownership

The owns keyword can be used to define a type as an owner of an attribute type.

define user owns email;

Undefining ownership

The owns keyword can be used to undefine a type’s ownership of an attribute type.

undefine owns email from user;

Matching

Matching owned attribute types

The owns keyword can be used to match all attribute types a type owns.

match user owns $a;

Matching owner types

The owns keyword can be used to match all owner types for an attribute type.

match $o owns email;