Why a flat file?
Marten Terpstra
Wed Apr 6 18:35:28 CEST 1994
Laurent Joncheray <lpj at merit.edu> writes * > Apart the usability by other people/programs (agrep covers a lot of * > sins/scripts) the size of the dbm file * > is likely to be enourmous as well. Of course you can easily walk the * > whole dbm file and produce a readable version but the offset idea * > seems quick enough anyway so why bother ? * * What happens to the flat file when you do a delete or * update? What about the updated offset? How does the flat file look like * just before the cleandb job? This is what happens at a delete: - the object is looked up - the reference in the dbm file to this object is removed (therefore this object can no longer be looked up) - the first attribute (*in: for networks) is replaced by (*XX:) thereby not changing the file size and other offsets - any new objects are ALWAYS appended to the file, and offsets added to the dbm file - at cleandb the bit that reads objects will automatically skip objects that start with *XX, therefore removing all the old (removed) objects. An update is nothing more than a delete followed by an addition. -Marten -------- Logged at Wed Apr 6 22:33:19 MET DST 1994 ---------
[ rr-impl Archive ]