|
From: Rene <re...@gr...> - 2002-07-19 14:05:13
|
I finally got the database to behave properly. The size of the database is much smaller than I wrote last time. I've got an 11 MB text file which is converted into an 18 MB database. I've arranged the databases this way: fileindex.db keys are in this format: <"incrementing-number" dash "data-type"> Data-type are things like path, name and size. example: 0000000-00 => pathname 0000001-01 => filename 0000002-02 => date 0000003-03 => size of file 0000004-00 => pathname 0000005-01 => filename 0000006-02 => date 0000007-03 => size of file More data-types can be added. The only limitation at the moment is that all files must have all data-types. So if I add a new data-type to one file I need to add that to the rest as well. I can however be empty values on the files that don't need it, but they key must be there. dirindex.db has entries in this format: The key is the full path The value is the index range in fileindex.db example: path/to/somewhere => 300-312 some/other/path/1 => 313-544 The databases are generated when the backup is run. I also managed to generate the dirtree at the same time. That is saved as a serialized object and loaded when the users wishes to browse the files. That saves about 6 seconds of loading time on some of my backups. You said that you have some experience with these simple databases. Please let me know if you think there a better ways to do this. Then I can correct it before I continue. -Rene |