typedb / typeql

TypeQL: the power of programming, in your database
https://typedb.com
Mozilla Public License 2.0
219 stars 46 forks source link

Inference Rule #128

Closed shreyashpalande closed 3 years ago

shreyashpalande commented 4 years ago
define

state sub attribute, datatype string;
Parent_Component sub entity,
 has state,
 plays super_component;

Child1 sub entity,
 has state,
 plays sub_component;
Child2 sub entity,
 has state,
 plays sub_component;
Child3 sub entity,
 has state,
 plays sub_component;

Component sub relation,
 relates sub_component,
 relates super_component;

Case: There is the super component which is dependent on 3 sub-components. If all the sub-components have a healthy state then the super component has a healthy state. If any of the sub-component has a faulty state then the super component will have a faulty state. And a state of sub-component changes with time.

Is this case possible to write in form of inference rule? match insert is not feasible if the system scales vertically and there is a fault in the lowest component.

flyingsilverfin commented 3 years ago

Hiya - if this is still an issue, please post it in our forum under: https://forum.vaticle.com/c/graql/7