Annotated edit history of FlatFiles version 4, including all changes. View license author blame.
Rev Author # Line
1 DanielLawson 1 FlatFiles refers to a method of storing data which makes use of basic files. There is normally no ordering, nor is there any indexing.
3 /etc/passwd is a typical example of this.
5 The 'Flat' refers to the lack of ordering or hierarchy within the files.
3 PerryLorier 7 FlatFiles are inefficient for large volumes of data, as lookups tend to be O(n) and there is no way of placing an index on the file. If you are using a very large !FlatFile and want to improve performance, try storing its contents in a better FileFormat, such as a dbm, or a good SQL database.
1 DanielLawson 8
4 PerryLorier 10 Most configuration files are in !FlatFile format. This is normally fine, but in some cases you want good dynamic control over the contents of the files. If the program you are using cannot support a better FileFormat than !FlatFiles, then you could always store your data however you like - eg in [SQL] or [LDAP], and have a script which runs regularly and updates the FlatFiles your program relies on.
12 It's common that you use !FlatFiles for configuration and then use "hashdb" to "compile" the configuration file into a dbm, this is often done with /etc/passwd, /etc/shadow, /etc/aliasias, /etc/mail/virtusertable etc.