Gulava allows you to write relational predicates in Java. You can write Prolog-style predicates and use them from normal Java code, seamlessly integrated with the magic of annotation processors. See ...
SQL language is good for doing ad-hoc queries from relational databases but it becomes very complicated when doing more complex analytical queries to get summary results. Alternative approach is OLAP ...