Deductive database

I was wondering if there were any deductive databases that were easy to use from OCaml? I have a project I’m thinking of and it seems a deductive database is what I want. Unfortunately it seems most are toy implementations, missing things like negation, or retractions. So far I found Datomic, but that seems a bit heavier than I need. Although it appears to be easy enough to use through REST, and the free version should work for my case.

I’m pretty open to solutions, but the qualities I would like are:
Persistent (store to filesystem)
Deductive capabilities (rules)
Negation
Reasonably fast with a couple million facts
Add/update/delete
Support for some different data types, string, and number at least
Query language in the spirit of datalog (doesn’t need the syntax, just the ability)

Any thoughts? Thank you!

You might try to combine Irmin and ELPI for that.

Elpi looks interesting, I’ll see what it can do. Might be too much!