Full featured database which not only builds on the Key/Value Deep Store concept with full transaction checkpointing and recovery and embedded and server models, but provides a novel way of storing, retrieving and relating complex unstructured object data.
To get slightly more technical; imagine that rather than being able to map keys one-to-one like a relational database you can map them through a function that adds more relevance.
We can then assign equivalence through isomorphism, or functional similarities between data. The relationships themselves are objects which can be composed into higher level relationships that
open up the data to perform analysis not possible with conventional databases. Here are some concrete examples:
Building relationships is as easy as saying:
Relatrix.store([fromObject],[mapObject],[toObject]); // This stores a functional relationship
and a query for that set is as simple as:
Stream stream = (Stream) Relatrix.findStream("?", "?", "?");
stream.forEach(e -> Stream.of(e).forEach(g -> System.out.println("Element A:"+g)));
Or using the old Iterator model:
Iterator iterator = Relatrix.findSet("?",[mapObject],"?"); // This retrieves all domain objects and range objects mapped through [mapObject]
To compose two relationships to an association:
Relatrix.store([fromObject1],[mapObject1],Relatrix.store([fromObject2],[mapObject2].[toObject2])); // This composes relationships
Stream stream = (Stream) Relatrix.findStream([fromObject1],"*","?", true); // This returns all range objects mapped to [fromObject1] through ANY map object in parallel, including the relationship stored above
Stream stream = (Stream) Relatrix.findStream(("*","*","*"); // This makes ready for consumption by stream all relationships as identity objects
public class VisualCortex {
public static void main(String[] args) throws Exception {
Relatrix.setTablespaceDirectory(args[0]);
Stream<Result> stream = (Stream<Result>) Relatrix.findStream("?", "?", "?", true);
Map<Object, Map<Object, Map<Object, Long>>> nameCount = stream.collect(Collectors.groupingBy(b -> b[0].toString(),
Collectors.groupingBy(d -> d[1].toString(),
Collectors.groupingBy(e -> e[2].toString(), Collectors.counting()))));
nameCount.forEach((name, count) -> {
System.out.println(name + ":" + count);
});
}
}