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

[REBOL] possible data format ... Re: Re: dbms3.r 01

From: petr:krenzelok:trz:cz at: 15-Jan-2002 6:56

Hi once again, I would like to suggest more complex data format, but then it really depends upon what you want to achieve. Let's talk 1 db = 1 file only. 1 ["Petr" "Krenzelok" [petr--krenzelok--trz--cz] 29] "R" 2 ["Someone" "Else" [someone--else--com] 18] "D" Some rules: - file would be organised in 1 rec = 1 line, so read/lines could be eventually used for in-memory mappings ... - new records would be write/appended to the end - record is provided with the status field - important one - by default deletion of record doesn't physically delete it from the file = speed = ability of easily recovering ('recall function in XBase land) deleted data. If you want to physically delete such records, use 'patch maintanance function, which could be performed once per some time period (it would also reassing record numbers, to remove holes in rec-no sequence) ... We could also use such field for locking mechanism .... - using record numbers is good for indices, you easily just keep record numbers and once creating some grid-view, you filter them out. But I haven't measured yet, how long it would take to do some e.g. 1K of Rebol 'select-s. Of course we can't probably use such aproach, untill open/seek is available ... - what do we lack is proper and real grid. Rebol list view is just a toy for some hundreds of records. For larger amount of records to browse we need grid with dynamic caching ...(although not so necessary in the beginning of the project) Few notes: - love ir or hate it - my description is not the demagogy, it can be easily put in trashcan :-) - it is also good for row/column oriented design, although I can imagine, that record data block could be of variable size. What do I miss (and Carl once told it would be cool :-), is the ability of parse function to work on opened/uncached file (e.g. look at Netscape/Mozilla stored mailboxes - would be handy) ... well, that's few of my ideas in the early morning :-) -pekr-