Fork me on GitHub
Al Baker02:05:37

we have a Stardog Labs blog, recently posted on data science usage and being able to pull a random set out of the graph with a query:


hi guys, Are there any strengths points to choose Datomic over RDF storage or the reverse?


• Datomic is native Clojure, so it's definitely comfortable to use. Keywords are nice. • It also has the benefit of immutable Databases, which matches the Clojure philosophy. • Each database version has a timestamp, and you can find data at any time. Every statement also stores the transaction and time it was asserted. This is nice too. • One nice feature is the ability to provision over many types of backends, though once you've settled on one then it doesn't matter too much. • Datomic has no query planner. This is both a blessing and a curse. It lets you specify the order of query evaluation, so you can get it right when a SPARQL system may not provide that for you. On the other hand, it forces you to choose your evaluation plan, and people get it wrong too. On the minus side: • Datomic seems oriented around rapid updates. Loading large datasets is horribly slow. Most RDF stores are likely to perform better for analytics. • There is no standard data format. Loading data needs some code. RDF databases can load the various RDF formats. • SPARQL has some extra query semantics, (though Datomic does allow filtering and binding with user space functions). • Lots of integration tools for RDF/SPARQL. Notsomuch for Datomic. • RDF stores can accept ontologies and/or rules, and thereby do reasoning. Datomic rules can be powerful, but not THAT powerful. • Speed: some of the RDF stores are just blazingly fast

☝️ 1

That’s amazing answer, Thank you


Regarding the point of RDF accepts ontologies/rules and reasoning and it seems superior to Datomic on that. if it is possible to give an example to clarify this point, it would be great.


This is “how long is a piece of string”, but an example I have at work is Laterality. We have. Class that indicates that something has a value for an attribute called laterality. It can only be from the pair: left or right. Then there can be cases where one of those values is excluded (eg, the heart is not on the right). If you ask for everything with a laterality of left you’ll get those things that were declared to have Laterality and can't be on the right.


It's a little obscure, but it's an example that shows some extra reasoning capability.


We can also use SHACL to declaratively confirm data structures are correct, rather than Datomic’s transaction functions (more of a philosophical question there)


But ontologies let us say things like, “show me all the patients who are over 50, have some kind of carcinoma, and never smoked”. Datomic could do part of that, but the “carcinoma” information isn't explicit. Instead some will have squamous cell carcinomas, others have basal cell carcinomas, and it will even include leukemia. But it won't include “melanoma”. This info comes from a complex taxonomy of related terms that an ontology reasoner can give us


Thanks a lot for your explanation :)

👍 1

That's off the top of my head just now on my phone. I’m sure others here can say a lot too!