Colin Johnstone wrote: > Gidday all, > > A colleague and I were having a discussion re pros and cons of use of > textfile to store data over a database. When would you use a database in > preference to storing users in a textfile? > > I have written a mailing list application in Perl that that has a double > optin registration process, so I use two text files. When you first > subscribe your name is written to list one when you complete the > registration process your name is removed from List 1 and written to list > two. > > This works fine and currently I have 200 subscribers, when do you think this > will become unmanageable and would be better served by a traditional > database? > > Thanks > Colin
The issue is not just scale, but complexity. In a sense, you have a distinction without a difference, since a well-organized text file can be converted into a database table quite quickly. I would say that you should use a database if: There are releationships between items in different table [files] that you wish to maintain or track You would like to potentially be able to sort or select by different field values. You wish to ensure that each mail recipient is listed one and only one time--though this can be tricky regarcless of storage technology, for reasons of human behavior. You sant to use privacy protections built into most database sytems All in all, if you think the scale of this project will become significant, you would be better off importing your text files into a database. Most RDBMS have import functions for this purpose. You might, depending on the current format of your text file, have to do some massaging via regex to put the data into standard importable format. Joseph -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]