Speed/size advantage to SQL?
I suppose this *might* be a better question on an actual web development board, but I know some of the regulars here actually feed themselves doing web programming, and just hang around cboard to "keep their chops up" or something, so your thoughts are appreciated.
As part of my experiment comparing perl/Mason to ruby on rails, I'm taking a small "document search" app I wrote in RonR and redoing it more or less identically using Mason (but not catalyst...). So, now my hands are less tied with regard to the "model" side of MVC, I am wondering: what is the advantage to using SQL as opposed to text files or some other form of data storage?
With the "docsearch" app, the documents are there already in HTML and I did not put them into an SQL db; the only thing I used the db for was as a subject-index and list of documents available to search, with paths, etc. So now I'm doing the Mason version and thinking that I could just (or almost) as easily keep these details in a text file. (That whole thing could be done in plain ol' CGI, but anyway...)
Which leads me to my question: is SQL used because it is portable, an industry standard, easy and efficient to use, or does it have real performance advantages? When I get to the point where I want to do something more complex (like forum software), is there some magic to SQL which will mean it is the only real choice, performance and storage space* wise? Or could a system that used directories of text files and small serialized data structure stores be roughly equivalent?
* I would assume the answer to the space question has to be no, since AFAICT there is no data compression used in SQL.