in reply to Re: Replacing SQL with perl
in thread Replacing SQL with perl

I didn't mean replace the database with file for all applications, just some. I've worked on projects with over powered, over indexed and over network databases. In those situations, the overheads have been huge. The dataset was small and it just didn't need it.

Again, I'm not suggesting ditching databases, as a rule, just ditching complex queries.

Obviously, write queries will have a very special arrangement. As you say, all the locking and stuff would be impossible. I suppose my question would be more aimed at read only queries.

--
Brother Marvell

Replies are listed 'Best First'.
Re: Re: Re: Replacing SQL with perl
by AgentM (Curate) on Dec 06, 2000 at 22:36 UTC
    Even so, I'm in favor of keeping my data together, even across a network. A small optimization by hard-coding in data is hardly worth spreading it around to 30 different scripts that will need it. Also, keeping data centralized allows for maximum expandability. If all of the REAL variables in your program are stored in the db, then you have no problem changing it, if, let's say, to new entries must be accomodated for.

    But, if you have 100% static data, then, by all means, put it whereever you want (though I would still like to keep the data centralized). This occurs so rarely, that this may not even be useful. Using perl on flat-files (especially CGIs on the same file) are dangerous since race conditions may occur and corrupt data. In this case, you may need to use a non-perl mutex server (like the one I'm writing now). So, 100% static, read-only data it is, then! Well, you might as well make it a constant var, then, eh?

    AgentM Systems nor Nasca Enterprises nor Bone::Easy nor Macperl is responsible for the comments made by AgentM. Remember, you can build any logical system with NOR.
Re: Re: Re: Replacing SQL with perl
by extremely (Priest) on Dec 07, 2000 at 14:36 UTC
    Actually, complex queries are the ones NOT to ditch. In fact, the answer is still no to all your questions.

    If you have a case where you think I'm wrong, I'd bet that a local cache would work better than sprucing up your perl with DB-like code. Let the DB do its job. Lots of people worked real hard to make it fast, efficient, and simple.

    --
    $you = new YOU;
    honk() if $you->love(perl)