RDF URIs as attributes of all types

I’ve watched the TypeDB video on YT: Comparing Semantic Web Technologies to TypeDB.

It’s a great video, and one of the things it showcases is how you can map RDF URIs on data elements by using a uri attribute that can be owned by anthing.

However, I don’t quite see how to use this in practice. Two things:

  1. For data this works, but since you cannot make uri owned by the root types it becomes cumbersome to maintain.
  2. For types I don’t even see a nice way to make this work, i.e. I don’t how to map a URI on a type, since I can’t state something like thing has uri.

I have seen a post here that seems to give a solution: [ Where to store type metadata?](Where to store type metadata? - #2 by alex).

I was hoping, however, that my less general case can be solved simpler.

Thanks!

Hi bartkl!

Re 1. If you want all your data to automatically have an uri attribute, you can first make your own abstract ‘root’ types entity_thing sub entity and relation_thing sub relation, which own a uri attribute. You can then simply have all other (entity or relation) types be subtypes of these root types, and they will automatically inherit the uri attribute.

Re 2. Since type names are unique in a TypeQL schema, they are essentially your URIs. You could just record a simple dictionary somewhere in your application that maps type names to extended URIs if required.

2 Likes