abfd333230
ChangeLog for further details. |
||
---|---|---|
.. | ||
.cvsignore | ||
attach.c | ||
batchrd.c | ||
bluewave.h | ||
charset.c | ||
clcomm.c | ||
client.c | ||
crc.c | ||
dbcfg.c | ||
dbdupe.c | ||
dbfdb.c | ||
dbftn.c | ||
dbmsgs.c | ||
dbnode.c | ||
dbtic.c | ||
dbuser.c | ||
diesel.c | ||
Diesel.doc | ||
diesel.h | ||
dostran.c | ||
endian.c | ||
execute.c | ||
expipe.c | ||
faddr.c | ||
falists.c | ||
ftn.c | ||
ftnmsg.c | ||
ftscprod.010 | ||
ftscprod.016 | ||
getheader.c | ||
gmtoffset.c | ||
hdr.c | ||
jam.h | ||
jammsg.c | ||
jammsg.h | ||
jamsys.h | ||
magic.c | ||
Makefile | ||
mangle.c | ||
mbdiesel.c | ||
mbfile.c | ||
mbinet.h | ||
mbse.h | ||
mbsedb.h | ||
mbselib.h | ||
mkprod.awk | ||
msg.c | ||
msg.h | ||
msgtext.c | ||
msgtext.h | ||
nntp.c | ||
nodelist.c | ||
nodelist.conf | ||
nodelist.h | ||
nodelock.c | ||
noderecord.c | ||
packet.c | ||
parsedate.c | ||
pidinfo.c | ||
pktname.c | ||
pop3.c | ||
proglock.c | ||
rawio.c | ||
README | ||
README.diesel | ||
README.macro | ||
rearc.c | ||
remask.c | ||
rfcaddr.c | ||
rfcdate.c | ||
rfcmsg.c | ||
sectest.c | ||
semafore.c | ||
signame.c | ||
smtp.c | ||
strcasestr.c | ||
strutil.c | ||
term.c | ||
timers.c | ||
tmpwork.c | ||
unpacker.c | ||
users.h | ||
virscan.c |
Database structures. Most databases have a structure with a header record. The header record is at the beginning of the datafile and contains information about the size of the header record and size of the database records. When a data file is opened for reading the first thing to read the header record. The field recsize contains the size of the datarecords and the field hdrsize the offset to the first datarecord in the file. If in the structure the size of the datarecords changes (grows), we can allways read the old format in the correct way. When a datafile is changed the datafile has to be rewritten completly. Of course the new format is used then, and the new size must be stored in the header. The advantage of this technique is that updates can be performed automatic. There is no need for free space for future use in the datarecords, the files are thus smaller. One other important thing, with some DOS based bbs'es, mail/tic processors are using index files together with the data files to speed up the search in the databases. Also some of them use internal memory cache for the data records. I choose not to do this for two reasons, Linux like other Unices handles file I/O very fast and when your system is not low on memory the kernel will buffer all disk I/O in memory. Also Linux disks are very low fragmented due to the design of the ext2fs. Whith all this in mind, using index files is only extra overhead. However, because of this you should not put the data files on a msdos dos partition or on a nfs server. The only exeption that uses index files are the nodelists.