[REBOL] Re: dbms3.r 01
From: petr:krenzelok:trz:cz at: 15-Jan-2002 6:26
Maybe the block structure is the way to go. If you look at current ODBC Rebol
solution, it retrieves block of blocks (records), transformed or not, into Rebol
datatypes. I already have several functions, where I can map such record to
object - very comfort aproach, using foreach ....
foreach record record-set [rec: map-2-object template record .... do something
with that object ...]
, where template can be retrieved as simply another query to datase (in case of
ODBC "Insert odbc-port ['columns dbname]), or just predefined (then only fields
available in template map ....)
What I am more interested in is - data integrity. If we will use only one file for
our db, do we have to save upon each change? Because if we don't do that, and our
app crashes, all changes are lost ....
As for unique IDs, Elan took the right aproach imo. Rebol is about distribution,
so don't start creating dumb system, if you really don't require only that, and
nothing more. But I know the tastes - once you finish it, you will want to add
another features. Elan for e.g. created system, where each video store could be
assigned unique ID thru CGI process on some remote machine - ID unique to all
video stores using the app.
Also - per-file-record was MUCH better aproach, than storing everything in one
file, unless you open the file on disk and forget memory based aproach. What is a
little bit of a problem is - you use file system, so performance can vary. But
hey, you just wanted to handle some 100 - 10K records, no? Again - look at what
Elan did, and improve upon it, IIRC he used some techniques, which could be
As for database normalisation - come on, guys ;-) You want to achieve some simple
db functionality, yet considering db normalisation? We created some middle size
system (cca 70 tables, some of them having > 100 columns and 200K records), yet we
sometimes use email1 email2 just in one record, not providing sub-related table.
As for fields duplication in sub-related (daughter) tables - yes, it's like that,
but no real problem here ....
As for me, once open/seek mode is available, I would try to go with XBase format -
many tools use it - FoxPro, Clipper, Visual Objects, Visual Basic, Delphi can,
etc. etc. - there are already tools to browse such data, and I can provide you
with format description. But, huh, too much of work and wheel reinvention in any
So, for me, even if done in Rebol, I can't think of anything simpler then what
Elan created, although I don't like the idea of some tens of thousands of records
scattered around my hd in form of small files :-)