New ACM paper, free-tier cloud, and open-source license

Lesson 7: Understanding query patterns

In this lesson, we’ll learn advanced aspects of building query patterns. We’ll begin by examining how TypeDB resolves patterns against the schema as constraint satisfaction problems. We’ll then examine some specific syntax elements we can use in patterns, including advanced relation patterns, logical operators, value comparisons, and value expressions. Finally, we’ll study the semantics of solution sets, to understand how the number of times a pattern is matched can affect the results of read and write queries.

  • You should complete Lesson 5 before starting this lesson.

Lesson contents

Learn how patterns are treated as constraint satisfaction problems.

Learn how to construct different representations of relations.

Learn how to use disjunctions, negations, and identities.

Learn how to compare the values of different attributes.

Learn how to create and use temporary value variables.

Learn about how different patterns affect the number of results.

TypeQL keywords introduced

  • or

  • not

  • is

  • like

  • contains

  • min

  • max

  • round

  • floor

  • ceil

  • abs

Provide Feedback