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

[REBOL] Re: dbms3.r 01

From: g:santilli:tiscalinet:it at: 17-Jan-2002 21:22

Hello Romano! On 15-Gen-02, you wrote: RT> Yes but often we need blocks of blocks of data. Actually I think my code got a lot better when switching from the old block-based dbms.r to the new object-based one... RT> should offer only a collection (block) of data not a fixed RT> struct like an object which cannot be extedend without Actually the relational model includes a name for the column; other languages (PHP etc.) offer records as associative arrays, and the thing that most resembles associative arrays in REBOL is object!. RT> cloning (and the definition of which, it seems to me, is RT> created by your program at each iteration) and that is not DB-FOREACH reuses the same object across evaluations for efficiency. Of course DB-PICK can't do something like that, so it will create a new object each time. RT> To find replace sort a collection of objects is not a direct RT> task. Indeed that's something that the DBMS should do, not you. REBOL does not have a table! datatype... :) RT> A block can be easy converted in another datatype! like an RT> hash! for fast search. You'll need to search in a record? That's quite strange IMHO. :) Better redesign your table, but you can use SECOND OBJECT anyway if you need. RT> I think also that the layout of object (if it exists) could RT> be defined by user and dbms should only bind data to the user It is, when the user defined the table. RT> Object interface is surely useful for db-foreach, but i RT> always think at a kind of db-select [name surname] [sort by RT> name] which return a block of blocks. I'm not sure about its usefulness, but I might include something like that in dbms3.r. Regards, Gabriele. -- Gabriele Santilli <[giesse--writeme--com]> - Amigan - REBOL programmer Amiga Group Italia sez. L'Aquila -- http://www.amyresource.it/AGI/