dbms req file-format
[1/1] from: rebol665::ifrance::com at: 15-Jan-2002 21:46
Hi, Rebolers
Part 1 - facts
Some infos that I hope valuable to the discussion.
I use dbms.r to hold a very simple photo database. Each record consists of
- photo: the photo name (a .jpg file)
- critere: an integer in which each bit is set or unset depending some
criterion (critere is french for criterion)
- info: a short comment or remark about the photo.
Here is the code I use to fill the base to illustrate how easy it is to use
dbms.r
if not exists? dbms/columns [
db-create dbms [photo critere info]
foreach file read rep-photo [db-append dbms make object! [photo: file
critere: 0 info: " "] ]
]
I mostly wanted to show you something about the database. I have 4 databases
at the moment, here a the statistics.
1. 303 files 9954 bytes 1 241 088 bytes used
2. 192 files 4704 bytes 786 432 bytes used
3. 157 files 5238 bytes 643072 bytes used
4. 145 files 7600 bytes 593920 bytes used
You can see that 1 Mo is almost necessary to hold a 10 Ko database.
Part 2 - Suggestion
In my opinion, it would be feasible to hold all the database in memory and
simply flush it all to save it. I remember that, when I was young, I have
used a database like that on my CPC464 computer. And I was very happy with
it.
Patrick