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

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

From: petr:krenzelok:trz:cz at: 16-Jan-2002 6:24

> What I (my opinions only) conclude so far, though review of some of > the existing implementations may change this - > > 1. Text files for persistent storage > 2. REBOL Blocks for grouping values > 3. Native REBOL representation for values > 4. Use single base directory - no directory structure required > 5. Use multiple (named) text files to map to tables, indexes and large text blocks > 6. Keep at least the table data file simple, readable, and self contained > 7. One record per line > 8. Use some manner of file append to manage record changes > 9. Delete record operation is only a marker until packed > 10. Need utilities to pack db and provide canonical form > 11. Every row has an automatic internal "row-id" > 12. Manipulate records as blocks of values > 13. Result sets are built as blocks of blocks of values > 14. The in-memory format should not be constrained by the persistent format >
Very good one - at least for me - starting point we could agree upon :-) Few questions, comments, which are not clear for me yet: - status markers could be used even for things as locking .... a) now I am not sure if locking should happen on index level (dangerous if someone will not use any index), or in database itself ... b) if we have no db server and our app fails, record would stay locked forever, so we would have to complicate things with some time-stamps or so ... - I don't understand how you want to use file appends to manage changes to records. What rec-number will be used for changed record? It should be the same one. If so, then we need to introduce versioning (we use such aproach in one of our tables, although for different purpose) - record-numbers - I hope it is clear enough, that 'pack-ing the database will reassign record numbers to remove holes caused by record deletion ... - variable record size - a block. OK - how will we map it to any rebol structure/object? I just hope that at least that number of columns are the same thru all records or I can't imagine it in other way than duplicating column names in each record, e.g. [name: "pekr" lastname: "krenzelok"], which is not good aproach to follow imo? So, anyone answers my questions? :-) -pekr-