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

Lesson 3: Reading data

Overview

In this lesson, we’ll learn how to read pre-inserted data in the sample database using Fetch queries. We’ll begin by seeing how we can retrieve entities and relations in a similar way to how we do with relational databases. We’ll then see how we can retrieve data in unique ways using TypeDB: by writing declarative polymorphic queries, by leveraging rule inference, and by retrieving types from the schema. Finally, we’ll look at a few examples of type inference at work by seeing how TypeDB validates queries.

  • You should complete Lesson 2 before starting this lesson.

TypeQL keywords introduced

  • match

  • fetch

  • attribute

  • isa

  • has

  • entity

  • relation

  • isa!

  • sub

  • sub!

  • owns

  • relates

  • plays

Provide Feedback