Re: [sqlite] Accessing an sqlite db from two different programs

2010-06-30 Thread Sylvain Pointeau
to not block all users with updates.

On Tue, Jun 29, 2010 at 6:54 PM, Greg Burd <greg.b...@oracle.com> wrote:

> Why "the smallest update possible"?
>
> -grge
>
> > -Original Message-
> > From: Sylvain Pointeau [mailto:sylvain.point...@gmail.com]
> > Sent: Monday, June 28, 2010 6:36 PM
> > To: General Discussion of SQLite Database
> > Subject: Re: [sqlite] Accessing an sqlite db from two different
> > programs
> >
> > absolutely no problem with sqlite.
> > ensure you are doing smallest update as possible.
> > ___
> > sqlite-users mailing list
> > sqlite-users@sqlite.org
> > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Accessing an sqlite db from two different programs

2010-06-28 Thread Sylvain Pointeau
absolutely no problem with sqlite.
ensure you are doing smallest update as possible.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Accessing an sqlite db from two different programs

2010-06-28 Thread Greg Burd
Ian,

You might try Berkeley DB 11gR2 (read: Berkeley DB and SQLite combined) it 
allows you to run multi-process access to a SQLite database and scales really 
well.

http://download.oracle.com/berkeley-db/db-5.0.21.tar.gz

Give it a whirl and then let me know what you think.

-greg

> -Original Message-
> From: Ian Hardingham [mailto:i...@mode7games.com]
> Sent: Tuesday, June 22, 2010 12:44 PM
> To: General Discussion of SQLite Database
> Subject: [sqlite] Accessing an sqlite db from two different programs
> 
> Hey guys,
> 
> If I have program 1 and program 2 which both open the same db file, but
> they never write to the same table (but might be reading one written by
> another), do I need to do a lot of locking?  I'm not worried about race
> conditions.
> 
> Thanks,
> Ian
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Accessing an sqlite db from two different programs

2010-06-23 Thread Simon Slavin

On 22 Jun 2010, at 5:44pm, Ian Hardingham wrote:

> If I have program 1 and program 2 which both open the same db file, but 
> they never write to the same table (but might be reading one written by 
> another), do I need to do a lot of locking?  I'm not worried about race 
> conditions.

SQLite will need to do locking for you, because SQLite locks the entire 
database rather than just one table or one row.  You must monitor the codes 
returned from your calls, dealing with SQLITE_BUSY and SQLITE_LOCKED 
accordingly.

Simon.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Accessing an sqlite db from two different programs

2010-06-23 Thread Ian Hardingham
Hey guys,

If I have program 1 and program 2 which both open the same db file, but 
they never write to the same table (but might be reading one written by 
another), do I need to do a lot of locking?  I'm not worried about race 
conditions.

Thanks,
Ian
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Accessing an sqlite db from two different programs

2010-06-22 Thread Pavel Ivanov
> do I need to do a lot of locking?

You don't need to do it, SQLite will do that for you. And it doesn't
matter whether both applications write to the same table or different
ones - as long as they write to the same file those writes will be
serialized by locking made inside SQLite.

But you have to be aware of SQLITE_BUSY code that can be returned from
SQLite functions, so be sure that you process it properly.


Pavel

On Tue, Jun 22, 2010 at 12:44 PM, Ian Hardingham  wrote:
> Hey guys,
>
> If I have program 1 and program 2 which both open the same db file, but
> they never write to the same table (but might be reading one written by
> another), do I need to do a lot of locking?  I'm not worried about race
> conditions.
>
> Thanks,
> Ian
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Accessing an sqlite db from two different programs

2010-06-22 Thread Simon Slavin

On 22 Jun 2010, at 5:44pm, Ian Hardingham wrote:

> If I have program 1 and program 2 which both open the same db file, but 
> they never write to the same table (but might be reading one written by 
> another), do I need to do a lot of locking?  I'm not worried about race 
> conditions.

Sorry, you still need to worry about locking.  SQLite locks the entire 
database, not individual tables or rows.

Simon.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Accessing an sqlite db from two different programs

2010-06-22 Thread Ian Hardingham
Hey guys,

If I have program 1 and program 2 which both open the same db file, but 
they never write to the same table (but might be reading one written by 
another), do I need to do a lot of locking?  I'm not worried about race 
conditions.

Thanks,
Ian
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users