|
From: Rene <re...@gr...> - 2002-07-21 07:19:57
|
Ok.. I'll update the cvs soon. Maybe even today. I implemented the format using ranges. It was almost too easy.. I also removed some of the old stuff and plan to remove a lot more. -Rene On Sun, 2002-07-21 at 08:57, Joe zacky wrote: > I don't know. I haven't examined BOBS database at all. I have no idea. > > Rene Rask wrote: > > >The problem here is that I don't know how many entries a file have in the > >databases. Not a good thing. > > > >I was thinking about assigning ranges to the files instead. > >example. file number 1 has the range 000-099, number 2 has the range 100-199 > >That would make it easy to fetch needed values and files don't have to > >have the same amount of entries. > > > >Let me know what you think.. I would like to do it right this time :) > > > >-Rene > > > > > > > > > >>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 > >> > >> > >> > >> > >> > >> > >> > >>------------------------------------------------------- > >>This sf.net email is sponsored by:ThinkGeek > >>Welcome to geek heaven. > >>http://thinkgeek.com/sf > >>_______________________________________________ > >>Bobs-devel mailing list > >>Bob...@li... > >>https://lists.sourceforge.net/lists/listinfo/bobs-devel > >> > >> > > > > > > > > > > > >------------------------------------------------------- > >This sf.net email is sponsored by:ThinkGeek > >Welcome to geek heaven. > >http://thinkgeek.com/sf > >_______________________________________________ > >Bobs-devel mailing list > >Bob...@li... > >https://lists.sourceforge.net/lists/listinfo/bobs-devel > > > > > > > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Bobs-devel mailing list > Bob...@li... > https://lists.sourceforge.net/lists/listinfo/bobs-devel |