I just read the white-paper and I don't understand one thing - it talks about advantages upon relational model, while it doesn't show single example of how data are stored, and what tool to use for querying. It is very easy to say SQL is something to be replaced, but then they should say in what form are queries/views applied. Or I just don't understand it deeply enough yet. Do you have any practical example of associative model usability? What exactly do schemas and metadata describe?
Thanks, -pekr- Andrew Martin wrote: > So I had a look at the white paper and implemented the flight example in > Rebol. Here's the contents of %Flight.r: > > "Flight BA1234" > "London Heathrow" > 12/Aug/98 > 10:25 > "arrived at" > "on" > "at" > [1 5 2] > [8 6 3] > [9 7 4] > "Concorde" > [10 6 11] > > Basically a block of Rebol values; string!, date!, time! and block!. The > associations are the three integers in blocks at the end. Then I wrote this > to join up the associations: > > Database: load %Flight.r > > SVO: function [Database [block!] Item] [Subject Verb Object] [ > either block? Item [ > Subject: Item/1 > Verb: Item/2 > Object: Item/3 > Subject: SVO Database Database/:Subject > Verb: SVO Database Database/:Verb > Object: SVO Database Database/:Object > reduce [Subject Verb Object] > ] [ > Item > ] > ] > > foreach Item Database [ > print SVO Database Item > ] > > And running the above script gives the output: > > Flight BA1234 > London Heathrow > 12-Aug-1998 > 10:25 > arrived at > on > at > Flight BA1234 arrived at London Heathrow > Flight BA1234 arrived at London Heathrow on 12-Aug-1998 > Flight BA1234 arrived at London Heathrow on 12-Aug-1998 at 10:25 > Concorde > Flight BA1234 arrived at London Heathrow on 12-Aug-1998 at 10:25 on Concorde > >> > > Note that I've added the "on Concorde" part to the example. > > I'll think I'll work up some more magic stuff and thread my HTML dialect > through it, so I can create sentences (SVOs) through a browser > interactively. > > Andrew Martin > ICQ: 26227169 http://valley.150m.com/ > -><- > > -- > To unsubscribe from this list, please send an email to > [EMAIL PROTECTED] with "unsubscribe" in the > subject, without the quotes. -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes.
