Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

Implementing the associative model of data (tm) in Rebol

 [1/3] from: al:bri:xtra at: 29-Jan-2002 18:58


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/

 [2/3] from: petr::krenzelok::trz::cz at: 29-Jan-2002 9:31


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:

 [3/3] from: rebol665:ifrance at: 29-Jan-2002 13:16


Hi Petr To get more info, you need to download for free "Sentences personal edition". You will find then that several .PDF documentations are available. Patrick ----- Original Message ----- From: "Petr Krenzelok" <[petr--krenzelok--trz--cz]> To: <[rebol-list--rebol--com]> Sent: Tuesday, January 29, 2002 9:31 AM Subject: [REBOL] Re: Implementing the associative model of data (tm) in Rebol