Database Types and Formats ========================== Pacman 2.X style database - flat files -------------------------------------- pmpkgfrom_t value: FROM_FILEDB Layout: dbroot/ pkgone-1.0-1/ [changelog] depends desc [files] [install] pkgtwo-3.1-3/ ... Entries (files) in the DB listed with [] are only found in the local database. Advantages: 1. Speed when only a few entries have to be read. 2. Ability to easily modify/fix by hand. (Of course, one can use vim to edit a tar file or most other compressed archives.) Disadvantages (also see advantages of tar DB format): 1. Speed. When the files are not loaded into memory buffers, it takes forever to stat and read all the files. Tar database ------------ pmpkgfrom_t value: FROM_TARDB Layout: dbroot/ pkgone-1.0-1/ [changelog] [files] info [install] pkgtwo-3.1-3/ ... Entries (files) in the DB listed with [] are only found in the local database. Advantages: 1. Speed. Becuase the database normally consists of many entries that could otherwise spread themself across a disc, keeping the database in one file greatly speeds the loading and reading time. 2. Easy to replace. When used as the sync database format, one file is deleted and another is dropped in its place. Disadvantages (also see advantages of 2.X DB format): 1. Primarily a read-only format, which works well in sync DBs but not as well for a local database. Binary database --------------- (TODO) Structured database (such as sqlite) ------------------------------------ (TODO)