Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save flyingsilverfin/a84cee9b9c0372dd374d1a00d4210fb8 to your computer and use it in GitHub Desktop.
Save flyingsilverfin/a84cee9b9c0372dd374d1a00d4210fb8 to your computer and use it in GitHub Desktop.
Inference in TypeDB blog: social network schema
define
person sub entity,
plays friendship:friend,
plays following:follower,
plays family:member,
plays ownership:owner;
page sub entity,
plays following:followed,
plays ownership:owned,
plays parent-page:parent,
plays parent-page:child;
friendship sub relation,
relates friend;
following sub relation,
relates follower,
relates followed;
family sub relation,
relates member;
ownership sub relation,
relates owned,
relates owner;
parent-page sub relation,
relates parent,
relates child;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment