Quantcast
Viewing all articles
Browse latest Browse all 3

Can edges refer to parts of the schema?

@balkamm wrote:

In an RDF store, the “schema” is just a set of triples in the store itself, and you can make statements about the rdfs:Classes or rdfs:Properties (types or predicates in dgraph parlance) which you define.

However I haven’t yet found an equivalent mechanism to make statements about the type system in dgraph. The root of my question is “do types or predicates get uids?” i.e. can we add edges to/from them in the graph itself.

I’ll give a concrete example that I’m thinking about. Imagine that you have:

type Person {
  height: float
}

I’d like to be able to describe the distribution of heights (say normal with some mean/stddev) and then be able to randomly sample from that distribution to generate a realistic height on demand. The distribution would clearly be a property of the predicate, rather than any specific node or edge in the graph.

I can imagine a way to do this by building a shadow schema inside the store, and relating it to the actual schema using strings, but that feels brittle. Is such a thing possible or on the roadmap?

Thanks!

Read full topic


Viewing all articles
Browse latest Browse all 3

Trending Articles