Hey,
Recently worked on a project using BaseX [2]. I wrote a blog post about it here [1]. Something that might be interesting is building a Merkle tree [3] [4] in XQuery and storing/querying it in BaseX.
[1] https://blog.garage-coding.com/2016/09/01/detecting-potentially-malicious-ph... [2] https://github.com/wsdookadr/mdetect [3] https://github.com/wsdookadr/mdetect/blob/master/resources/mast.xql [4] https://en.wikipedia.org/wiki/Merkle_tree