basic question about sqlite

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

basic question about sqlite

Dave Dyer

If I designed a sqlite database to be used by a bunch of independent
applications, for example a bunch of CGI scripts each of which
opened the database, did some processing, and exited, would
that be (a) safe (b) effecient ?

Reply | Threaded
Open this post in threaded view
|

Re: basic question about sqlite

Jay Sprenkle
On 10/28/05, Dave Dyer <[hidden email]> wrote:
>
> If I designed a sqlite database to be used by a bunch of independent
> applications, for example a bunch of CGI scripts each of which
> opened the database, did some processing, and exited, would
> that be (a) safe (b) effecient ?

As long as you check the return codes, which might indicate if you
have conflicts,
it should work just fine. That's exactly what I did with it. It works
fine and is quite speedy. You might consider fast cgi if your web
server supports it.
Reply | Threaded
Open this post in threaded view
|

Re: basic question about sqlite

John Stanton-3
In reply to this post by Dave Dyer
It would be safe and efficient provided that you did not have a massive
load with many processes expecting simultaneous access.  Just be careful
that your applications can gracefully handle the occasional lock state
and use transactions carefully.  Don't design in queries which have a
long execution time.  It is called "..lite" for a good reason.
JS

Dave Dyer wrote:
> If I designed a sqlite database to be used by a bunch of independent
> applications, for example a bunch of CGI scripts each of which
> opened the database, did some processing, and exited, would
> that be (a) safe (b) effecient ?
>