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

[REBOL] Re: dbms3.r 01

From: rotenca:telvia:it at: 18-Jan-2002 21:03

Hi, Gabriele
> 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...
Well. You like object, i like blocks. When i'll have the basic i/o routines (the hard part) i'll write my own block select routines. There is no problem at all.
> 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!.
Ok. But i want only duplicate a SQL SELECT FROM ... ORDER BY .... I do not neither more. I don't want to write a DB interface programs i want only to use data for programs which make a specialized things. I feel myself a true client :-). I do not want to see the structure of data. I do not care about it.
> 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... :)
No. I want to make it myself. I repeat: the db for me is only "a standard way" to store data. When i write a program often i have to store/retrieve data. In the past i have written custom routines for the task. I think it is better to have a set of routines/format to do the task in all my programs.
> 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.
The block is a block of blocks, block of selected field of records.
> 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.
I use it for list and text-list, my main need. But when there are the basic i/o functions is easy to write it by myself. 9/10 of my code does a query on a data set and visualize it, then the user select something and start an action which it is not related to the database itself in many cases. --- Ciao Romano