Discussion Forum

How does TypeDB handle contradictions

How does TypeDB handle contradictions in rules, input data or schema? i.e. What happens if two or more rules contradict on another? What happens if the database receives data that contradict data already present in the database? What happens if the schema has contradictions, or multiple entries for the same thing?
Also is there a way for the TypeDB to handle things that have by their very nature different, contradicting or a series of values but through, say Bayesian, neural network or fuzzy logic learning, to output or calculate the most likely one?

Just to complete the 20 char minimum.

Thanks for the reminder - slipped through in an influx of forum posts.

The short answer is: it’s impossible to generate contradictions in the first place. Rules are structured to prevent self-refuting cycles during inference (try it). Data that is inserted is taken as the source of truth, and rules operate over this to create new insights.

Schema itself has no negations, so cannot contradict itself. Data is always validated against the schema (eg. for role playability, attribute ownership, key ownership) and data that is contradicting the schema is rejected.

We don’t have any probabilistic reasoning at this time :slight_smile:

Hope that helps!

Yes but if I have 2 rules that contradict each other what will happen? I mean I could have a few million rules so some might contradict each other.

You will not be able to commit the rules! Have you tried it?

I haven’t tried anything to be honest. I am waiting for the TypeDB Studio.

Studio is out in alpha! It can do basic visualisation and reasoning/explanations.