Hi!<div><br></div><div>You can use Datalog or Racklog. In order to decide or just feel comfortable with any of them it could be beneficial for you to grasp some basics of Prolog; here's a decent online material:</div><div>
<a href="http://www.learnprolognow.org/">http://www.learnprolognow.org/</a></div><div><br></div><div>Speaking of structures: you don't have to name the fields. Facts you state are just relations. The position of a term in a fact denotes the meaning. You can think about it roughly like SQL without schema definition (and with deduction, backtracing ..etc).</div>
<div><br></div><div>The suitability is more obvious when you realize you how easy you can query your data, provided you gained some familiarity with Prolog..</div><div><br></div><div>best,</div><div><br></div><div>wojtek</div>
<div><br><div class="gmail_quote">On Sun, Sep 18, 2011 at 13:15, Mark Carter <span dir="ltr"><<a href="mailto:mcturra2000@yahoo.co.uk">mcturra2000@yahoo.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I've been in the process of writing a little financial accounts package in Racket. I'm wondering if, instead of writing a lot of scheme code, a lot of funtionality could be more expressively and concisely be written in Datalog. I've never used Datalog before, nor Prolog, but I know it's something to do with "my father's mother's sister".<br>
<br>
I've read the Datalog tutorial, and I wonder if it's worth digging deeper. Although my data is relatively simple, there are all sort of weird and wonderful ways that I want to slice and dice it.<br>
<br>
I suppose the first question is: does Datalog support structures?<br>
<br>
<br>
Let's say I have a concept called an "equity transaction", or etran. It has the fields sym (symbol), date, tag, qty (quantity) and cost.<br>
<br>
<br>
So suppose I bought 100 shares in Apple on Dec 28 2001 at $11.21 (I wish!).The symbol for Apple is "AAPL". How would I express that fact in Datalog (assume that the tag is just some arbitrary symbol for now)?<br>
<br>
Or am I completely barking up the wrong tree as to the likely suitability of Datalog to the problem at hand?<br>
</blockquote></div><br></div>