Thread: Speed/size advantage to SQL?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300

    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.
    Last edited by MK27; 06-09-2009 at 07:41 AM.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. OOP Question DB Access Wrapper Classes
    By digioz in forum C# Programming
    Replies: 2
    Last Post: 09-07-2008, 04:30 PM
  2. Please help create a loop for embedded SQL
    By cjohnman in forum C Programming
    Replies: 4
    Last Post: 04-24-2008, 06:46 AM
  3. Embedded SQL
    By sarac in forum C Programming
    Replies: 1
    Last Post: 05-04-2006, 09:09 AM
  4. Replies: 1
    Last Post: 03-21-2006, 07:52 AM
  5. Problem with embedded SQL in C/C++ (ECPG)
    By NeuralClone in forum C Programming
    Replies: 4
    Last Post: 10-21-2005, 05:16 PM

Tags for this Thread