When you further qualify by time/transaction you get EAVT like Datomic and then just do queries (potentially recursive), and can implement semantics like "classes" over it.