

That said, the core of unix configuration is all done with flat text files, which have the supreme advantage that a human can always read them.


It really isn't anything you want to do with user-supplied data. The other point about "exploding" arrays to make flat files is that the syntax gets messier and messier as you have to deal with escaping special characters. Then other object classes correspond to other DB tables, and everything gets referred to with an id code, which is the principal index in the table. If you have a lot of items like this, they naturally make a DB table. An associative array is basically a very loose 'object' or 'struct' (in C terms), and normally should map directly to an entry in a DB each DB column is an element of the array. Most people do entries by line, some do spaces. When doing a database in a flat-file, you are the designer of how the database is formatted. For example if its ext3 with a 4KiB block size then youd be limited to 16TiB. Even multidimensional arrays? In any case I've always felt reluctant to use databases with the small applications I write, maybe because I've never learned to use them properly.Ĭan't really say anything without knowing the specific application, but I think the more elegant the programming the less likely you are to have multidimensional arrays at all. You will only be limited by the amount of free-space on the servers hard drive and the file system used on the drive.
