0

我正在寻找一个大型三重存储数据库管理系统,该系统提供一种机制来保证提交的事务不会以使其与其 TBox 不一致的方式改变本体的 ABox。

到目前为止,我确定提供此机制的唯一一个是 Stardog ( https://www.stardog.com/docs/#_validating_constraints )。

GraphDB 是否提供任何类似的机制?

4

1 回答 1

1

GraphDB's rule language supports inference and consistency checking rules. You can rewrite the same published Integrity Validation Constraints (ICV) using the GraphDB's PIE syntax like:

Managers must be employees

A more generic version of this rule is to replace the "RDFS range" inference rule:

Id: prp_rng

  a <rdfs:range> b
  c a d
------------------------------------
  d <rdf:type> b

with the consistency checking equivalent:

Consistency: prp_rng_constraint

  a <rdf:type> b
  a <rdfs:range> c [Constraint b != c]
------------------------------------

If a rule with an empty consequence fires, it will generate a validation error.

Only employees can have an SSN

I would express the rule in a more generic way like that every type must have at least one property:

Consistency: min_cardinality

   a <owl:minCardinalityConstraint> "1"^^xsd:nonNegativeInteger
   a <owl:onType> b
   c <rdf:type> b
   ------------------------------------
   c a y

and then state in the ontology:

INSERT DATA {
     :ssn owl:minCardinalityConstraint "1"^^xsd:nonNegativeInteger;
          owl:onType :Employee.
};

A rule with consequence indicates that the statement must exist in the repository if the rule fires.

You can check more examples in the built-in ruleset.

于 2018-06-26T08:50:49.160 回答