Lesson 12: Advanced modeling

This documentation is not current - it is for TypeDB 2.x, which is no longer supported. View the documentation for TypeDB 3.x:

In this lesson, we’ll learn how to use the PERA model to design TypeDB schemas that eliminate mismatch with application models. We’ll begin by reviewing the fundamentals of the entity-centric framework of the PERA model, and how PERA types can be mapped onto to OOP types using the type-theoretic framework. We’ll then have a close look at using relations in this framework, and learn about the reification and de-reification processes. Finally, we’ll see how we can implement design by contract as a schema design strategy using interface contracts.

The application classes featured in this lesson are written in Python.

  • You should complete Lesson 9 before starting this lesson.

Lesson contents

Learn about the type-theoretic framework of the PERA model.

Learn how to represent application classes with relations.

Learn how to safely substitute binary relations for roles.

Learn how to apply design-by-contract to data models.