The obvious problems with using a text file:
- Searches become slow once text file gets big
- File format is brittle - any modifications of format require specialised converters
- Easy to make mistakes with failing to escape delimiter characters (I know this can happen in SQL too, but its consequences are much less serious (usually))
- Doing arbritary changes is nontrivial and easy to get wrong, specifically
- Locking is difficult to get right
Advantages of using a text file
- Inserts are of course much faster
- As long as it's really small, pretty straightforward to maintain (can use editors etc)
- Lower admin overhead to set it up
For me, for nontrivial apps, the SQL database has it.
But it's really a per-application decision. I deployed an e-commerce site recently which used only flat files for storage (not much there anyway).
Mark