Ontology -- constraints and performance


Been playing around quite a bit with the product and I have some questions I have yet to find an answer to:

  1. is it possible to model constraints like mandatory/optional resources?

  2. is it possible to limit or specifiy the amount of times a resource-type can be assigned to an entity/relation (when you specifiy ‘has name’, you can assign as many ‘name’-instances as you please – this is a great feature, but limiting the number seems also seems as important)?

  3. GRAQL/DB-performance. In a regular DB, I guess we’d be talking about indeces, but is there a way to improve performance when writing match queries? Especially ‘contains’ seem agonizingly slow (to a point that opening the source file, doing a text search and getting the actual id-value is faster).



Hi @kccoyote,

  1. At this stage we support keys as mandatory resources. So if you say person key id and person has name. You are saying that a person must have an ID resource and can optionally have a name.

  2. Not yet. Cardinality constraints is definitely on our todo. We have actually designed it but have not yet implemented it. We currently focusing on performance optimisations and bug fixes so this will likely be released shortly after 1.0.

  3. Another thing on our todo, user defined indices. This one will likely fall into the development of the next big release version.

Hope that helps.

  1. that’s great! I never noticed the ‘key’ keyword in the docs or the examples. Did I just miss it or is it so recent that it hasn’t made it in yet? (just wondering if I’m missing out on other stuff :slight_smile: )

  2. and 3. so many new things! Guess you guys have your roadmap planned out for the next couple releases!