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

TypeDB Lectures

TypeDB: the Polymorphic Database

Subscribe to lectures Download slides

There are three fundamental forms of polymorphism in computer science: inheritance polymorphism, interface polymorphism, and parametric polymorphism. In order to be fully polymorphic, a database must implement all three kinds. It must be able to interpret queries about a given type, that operate on instances of that type and all its subtypes. It must be able to interpret queries about a given interface type, that operate on instances of all types that implement it. And it must be able to interpret queries about parametrized types, that operate on instances of all types supplied as parameters.

TypeDB is the world’s first polymorphic database. It has a conceptual data model, a strong subtyping system, a symbolic reasoning engine, and a type-theoretic query language: TypeQL. TypeDB is able to interpret all three kinds of polymorphic queries. Those queries are truly declarative: it is not necessary to enumerate the types that are operated on. This is due to type inference, a process by which TypeDB infers the list of types that fit the query pattern and searches for instances of all of them. The strongly typed schema provides the necessary context for type inference, so the results are always type-safe. The ability to interpret declarative polymorphic queries brings unmatched expressivity and safety to the database, not possible with previous database paradigms.

In this lecture, we introduce TypeDB’s polymorphic modeling and querying capabilities. We’ll begin by introducing the three fundamental types of polymorphism, and examine some examples of polymorphic queries in natural language. Next, we’ll build a polymorphic TypeDB schema that models a simple filesystem featuring inheritance and interfaces. We’ll then explore the different ways that inheritance, interface, and parametric polymorphism can be utilized and combined in TypeQL query patterns. Finally, we’ll see how declarative polymorphic querying allows us to extend the schema without rewriting queries and trivially maintain application architectures.

Join this lecture and learn about:

  • How the three kinds of polymorphism manifest in natural data domains.
  • TypeDB’s unique modeling and querying capabilities as the polymorphic database.
  • The impact that a polymorphic database has on architecture maintenance.

Lecture materials:

  • Dr. James Whiteside

    James is a research engineer with over a decade’s experience as a programmer and expertise in computational solid-state physics. James has a rich background in academic and industrial research where he developed a profound passion for data modelling and algorithm design. The lack of expressivity in current database paradigmes led James to Vaticle, where he connected with the vision behind TypeDB. As a member of the Research Team, James is working to define an entirely new paradigm of polymorphic databases, and aims to carry the company’s vision forward by showcasing the unique expressive power of the data models he builds.

Further Learning

Learn more about TypeDB's core philosophy from the following fundamental article and lectures.