Help with first schema - Node type, edge types, relationships

Hello there!
I wanted to know how can I create different node types and edge types. I made a speadsheet to explain what I would like to achieve, but I don’t really know how schema works in Dgraph (ArangoDB seems a little bit clearer on that side)

A person node to store that person’s main data (password, email, etc)
I need an uuid for each node as a permalink, it needs to be ‘searchable’ to quickly retrieve the data
The type of the relationship. is it a follower, a friend, a pet worm?
Being able to know at which time this relationship started, if its a friend or manager, is it “accepted”

Being able to show certain value to certain people depending of that value’s setting

Am I on the right path? Or is this totally impossible with Dgraph?


Dgraph is an RDF store than a typical graph database that has node and edges are explicit types and have properties. So in Dgraph you model everything in terms of a triplet (Subject, Predicate, Object).

Predicates can be used to represent types, properties and relationships and you can use facets on predicate to indicate things like friend_since, friend_accepted etc.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.