Re: [sqlite] Transaction across threads

2008-04-15 Thread Shailesh Birari
Thank you Ken, Hipp and Shawn. 
Below I am trying to summarize sqlite in the three dimensions of shared
cache, transactions and threads. Please let me know which of the
following are correct. Ideally I would like to put this list on the
sqlite website for others.

1) With shared cache mode, multiple connections is same as a single
connection. So all facts to single connection in following points apply
to multiple connections with shared cache mode.
2) With non shared cache mode, multiple connections are independent.
They are always multiple connections contending with each other whether
across threads or across processes.
3) Sharing connection in non shared cache mode across threads is same as
each thread having independent connection in shared cache mode.

Transaction
---
Following points are when connection is shared across threads or
multiple connections are opened with shared cache mode enabled.
1) If a connection in one thread does a BEGIN TRANSACTION and another
thread does a insert (using shared connection or different connection
with shared cache mode) then this insert is strictly a part of the
transaction. there is no way an application can tell that this insert is
not a part of the transaction started by the first thread. So if the
application does not want this insert to be a part of the transaction,
it is upto the application to not do a insert if a transaction is in
progress.
2) On the same lines, BEGIN TRANSACTION on the thread followed by BEGIN
TRANSACTION on another thread is as good as nested transaction and will
error. Similarly BEGIN TRANSACTION on one thread can be committed by
COMMIT transaction on another thread.

Following points apply when there are multiple independent connections
to the database which is essentially in non-shared cache mode:
1) one can begin multiple transaction across connections, but they have
to be "read" transactions. If it becomes a write transaction, only one
write transaction can be active. So multiple "select" statements can be
active but only one "insert" statement will be active at any given point
of time.


Processes Vs thread:

1) There is no way that one can share a connection across processes
using a non-shared cache mode. So each process will have its own
connection.
2) With shared cache mode, multiple connections across processes is as
good a one connection and the all above rules apply as they are.

Please let me know what all statements are correct. If they are not
correct try to rewrite them so that we can add them to the wiki for
version '3.5.?'

Regards
Shailesh


> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of D. Richard Hipp
> Sent: Tuesday, April 15, 2008 9:24 PM
> To: General Discussion of SQLite Database
> Subject: Re: [sqlite] Transaction across threads
> 
> 
> On Apr 15, 2008, at 11:31 AM, Shawn Wilsher wrote:
> >> 1) If shared, then the second threads insert is part of the 
> >> transaction and should succeed.
> >> 2) No.
> >> 3) If the connection is shared between threads, there can 
> only be 1 
> >> txn at a time. The second threads attempt to begin a txn 
> will result 
> >> in an error that indicates a txn is already active.
> > To be clear, when using a shared cache and more than one sqlite3 
> > connection object, only one transaction will exist at a 
> time, correct?
> 
> Correct.
> 
> >
> > However, if it is not using the shared cache, you can have a 
> > transaction opened up for each thread?
> >
> 
> Well, sort of.  Certainly true if each connection has a 
> different database open.  But there can only be one write 
> transaction at a time to a single database.  If you have 
> multiple connections to the same database file, one can have 
> a write transaction open and one or more others can have a 
> read transaction open, but you cannot have two or more write 
> transactions active at once and all of the read transactions 
> will need to close prior to the write transaction committing 
> (otherwise the writer gets an
> SQLITE_BUSY.)
> 
> D. Richard Hipp
> [EMAIL PROTECTED]
> 
> 
> 
> ___
> 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


[sqlite] SQLITE_OMIT_TRIGGER compilation problems

2008-04-15 Thread Richard Klein
I compiled SQLite 3 (version 3.5.7), specifying
SQLITE_OMIT_TRIGGER to reduce the size of the
generated code.

I got the following compilation warnings in
parse.c:

-
parse.y(990) : error C2220: warning treated as error - no object file generated
parse.y(990) : warning C4013: 'sqlite3DeleteTriggerStep' undefined; assuming 
extern returning int
parse.y(959) : warning C4013: 'sqlite3FinishTrigger' undefined; assuming extern 
returning int
parse.y(965) : warning C4013: 'sqlite3BeginTrigger' undefined; assuming extern 
returning int
parse.y(1006) : warning C4013: 'sqlite3TriggerUpdateStep' undefined; assuming 
extern returning int
parse.y(1006) : warning C4047: '=' : 'TriggerStep *' differs in levels of 
indirection from 'int'
parse.y(1011) : warning C4013: 'sqlite3TriggerInsertStep' undefined; assuming 
extern returning int
parse.y(1011) : warning C4047: '=' : 'TriggerStep *' differs in levels of 
indirection from 'int'
parse.y(1014) : warning C4047: '=' : 'TriggerStep *' differs in levels of 
indirection from 'int'
parse.y(1018) : warning C4013: 'sqlite3TriggerDeleteStep' undefined; assuming 
extern returning int
parse.y(1018) : warning C4047: '=' : 'TriggerStep *' differs in levels of 
indirection from 'int'
parse.y(1021) : warning C4013: 'sqlite3TriggerSelectStep' undefined; assuming 
extern returning int
parse.y(1021) : warning C4047: '=' : 'TriggerStep *' differs in levels of 
indirection from 'int'
parse.y(1049) : warning C4013: 'sqlite3DropTrigger' undefined; assuming extern 
returning int
-

The various trigger functions are declared in
sqliteInt.h as follows:

-
#ifndef SQLITE_OMIT_TRIGGER
   void sqlite3BeginTrigger(Parse*, Token*,Token*,int,int,IdList*,SrcList*,
Expr*,int, int);
   void sqlite3FinishTrigger(Parse*, TriggerStep*, Token*);
   void sqlite3DropTrigger(Parse*, SrcList*, int);
   void sqlite3DropTriggerPtr(Parse*, Trigger*);
   int sqlite3TriggersExist(Parse*, Table*, int, ExprList*);
   int sqlite3CodeRowTrigger(Parse*, int, ExprList*, int, Table *, int, int,
int, int, u32*, u32*);
   void sqliteViewTriggers(Parse*, Table*, Expr*, int, ExprList*);
   void sqlite3DeleteTriggerStep(TriggerStep*);
   TriggerStep *sqlite3TriggerSelectStep(sqlite3*,Select*);
   TriggerStep *sqlite3TriggerInsertStep(sqlite3*,Token*, IdList*,
 ExprList*,Select*,int);
   TriggerStep *sqlite3TriggerUpdateStep(sqlite3*,Token*,ExprList*, Expr*, int);
   TriggerStep *sqlite3TriggerDeleteStep(sqlite3*,Token*, Expr*);
   void sqlite3DeleteTrigger(Trigger*);
   void sqlite3UnlinkAndDeleteTrigger(sqlite3*,int,const char*);
   void sqlite3SelectMask(Parse *, Select *, u32);
#else
# define sqlite3TriggersExist(A,B,C,D,E,F) 0
# define sqlite3DeleteTrigger(A)
# define sqlite3DropTriggerPtr(A,B)
# define sqlite3UnlinkAndDeleteTrigger(A,B,C)
# define sqlite3CodeRowTrigger(A,B,C,D,E,F,G,H,I,J,K) 0
# define sqlite3SelectMask(A, B, C)
#endif
-

It would seem that, in the #else section, we just need to
add 9 more no-op macros for the undefined trigger functions.

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


Re: [sqlite] [OT] Program to document database layout (revised version)

2008-04-15 Thread P Kishor
On 4/15/08, Hartwig Wiesmann <[EMAIL PROTECTED]> wrote:
> Hi,
>
>  sorry, but I forgot to mention in the original e-mail the operation
>  system: Mac OSX preferably.

sqleditor from the Malcolm Hardie Company in Scotland. It sells for <
$50 and is really stellar. It uses the JDBC SQLite driver to read
SQLite db as well as to create SQLite db.

All cocoa goodness, comments, notes, whathaveyou.



>
>  Hartwig
>
>  Original:
>
>  Hello,
>
>  this is a bit off topic: I am looking for a program that is suitable
>  for documenting the structure of a SQLite database. I am looking for a
>  program that can visualize the relations between different tables,
>  their connections and indices. Furthermore, comments should be
>  attached to tables or their fields or references to other tables. It
>  is not necessary to read the structure itself from the database.
>  Do you have any recommendations?
>
>  Hartwig
>
>
>  ___
>  sqlite-users mailing list
>  sqlite-users@sqlite.org
>  http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>


-- 
Puneet Kishor http://punkish.eidesis.org/
Nelson Institute for Environmental Studies http://www.nelson.wisc.edu/
Open Source Geospatial Foundation (OSGeo) http://www.osgeo.org/
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] [OT] Program to document database l ayout

2008-04-15 Thread Rich Shepard
On Wed, 16 Apr 2008, Hartwig Wiesmann wrote:

> this is a bit off topic: I am looking for a program that is suitable for
> documenting the structure of a SQLite database. I am looking for a program
> that can visualize the relations between different tables, their
> connections and indices. Furthermore, comments should be attached to
> tables or their fields or references to other tables. It is not necessary
> to read the structure itself from the database. Do you have any
> recommendations?

Hartwig,

   Ah! You want to create E-R Diagrams for your schema. Allow me to recommend
PSTricks with the pst-dbicons package. You create a LaTeX file specifying
the paths, shapes, and text, then compile it. You get total control over
everything while getting beautifully typeset output.

Rich

-- 
Richard B. Shepard, Ph.D.   |  IntegrityCredibility
Applied Ecosystem Services, Inc.|Innovation
 Voice: 503-667-4517  Fax: 503-667-8863
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] [OT] Program to document database l ayout (revised version)

2008-04-15 Thread Hartwig Wiesmann
Hi,

sorry, but I forgot to mention in the original e-mail the operation  
system: Mac OSX preferably.

Hartwig

Original:

Hello,

this is a bit off topic: I am looking for a program that is suitable  
for documenting the structure of a SQLite database. I am looking for a  
program that can visualize the relations between different tables,  
their connections and indices. Furthermore, comments should be  
attached to tables or their fields or references to other tables. It  
is not necessary to read the structure itself from the database.
Do you have any recommendations?

Hartwig


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


[sqlite] [OT] Program to document database l ayout

2008-04-15 Thread Hartwig Wiesmann
Hello,

this is a bit off topic: I am looking for a program that is suitable  
for documenting the structure of a SQLite database. I am looking for a  
program that can visualize the relations between different tables,  
their connections and indices. Furthermore, comments should be  
attached to tables or their fields or references to other tables. It  
is not necessary to read the structure itself from the database.
Do you have any recommendations?

Hartwig


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


Re: [sqlite] integer primary key and unique index?

2008-04-15 Thread Dennis Cote
Petite Abeille wrote:
> 
> Would adding an unique index on an integer primary key be of any  
> benefit? Or is it redundant?
> 

It would not help, and would in fact slow down all inserts, deletes, and 
updates for no benefit. It is redundant.

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


[sqlite] integer primary key and unique index?

2008-04-15 Thread Petite Abeille
Hello,

Would adding an unique index on an integer primary key be of any  
benefit? Or is it redundant?

In "Primary key and index", Ben Carlyle wrote the following:

1 Table = 1 BTree, the BTree holds the data and is ordered by ROWID
1 Table with 1 Index = 2 BTrees, the second referring to rows in the  
first
1 Table with PRIMARY KEY = 1 Table with 1 (unique) Index
1 Table with INTEGER PRIMARY KEY = 1 Table, with its own BTree forming  
its unique index
-- Ben Carlyle, "Primary key and index", 2004
http://osdir.com/ml/db.sqlite.general/2004-02/msg00067.html

Is that an accurate description?

Thanks in advance.

Kind regards,

--
PA.
http://alt.textdrive.com/nanoki/
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Transaction across threads

2008-04-15 Thread D. Richard Hipp

On Apr 15, 2008, at 11:31 AM, Shawn Wilsher wrote:
>> 1) If shared, then the second threads insert is part of the  
>> transaction and should succeed.
>> 2) No.
>> 3) If the connection is shared between threads, there can only be 1  
>> txn at a time. The second threads attempt to begin a txn will  
>> result in an error that indicates a txn is already active.
> To be clear, when using a shared cache and more than one sqlite3
> connection object, only one transaction will exist at a time, correct?

Correct.

>
> However, if it is not using the shared cache, you can have a
> transaction opened up for each thread?
>

Well, sort of.  Certainly true if each connection has a different
database open.  But there can only be one write transaction at
a time to a single database.  If you have multiple connections to
the same database file, one can have a write transaction open
and one or more others can have a read transaction open, but
you cannot have two or more write transactions active at once
and all of the read transactions will need to close prior to the
write transaction committing (otherwise the writer gets an
SQLITE_BUSY.)

D. Richard Hipp
[EMAIL PROTECTED]



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


Re: [sqlite] delete rows but the database files still have the big size

2008-04-15 Thread Joanne Pham
Thanks a lot Paul! It worked.
Thanks,
JP


- Original Message 
From: Paul Smith <[EMAIL PROTECTED]>
To: General Discussion of SQLite Database 
Sent: Tuesday, April 15, 2008 1:34:14 AM
Subject: Re: [sqlite] delete rows but the database files still have the big size

Joanne Pham wrote:
> Do I miss some commands here? I thought the database file size shoud get much 
> smaller after the delete operation but it isn't.
> Can you please help to let me know how to get the database file szie smaller.
> I have tried "VACUUM" but the file's size didn't change.
>  
VACUUM should do it.

When you delete rows, the file size won't change (this is common with 
most database engines) as that would require a lot of extra work (ie all 
the bits at the end of the file which are still in use will need moving 
into all the gaps which are now unused). VACUUM does that for you, but 
requires exclusive access to the database. DELETE doesn't do it, or it 
would be really time consuming. DELETE just marks the gaps as unused, so 
they can be re-used later.

Did you make sure that nothing else was using the database before you 
ran VACUUM on it?


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


  

Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] MAIL PROBLEM??? Fwd: "这是一封自 动回复邮件"

2008-04-15 Thread Lauri Ojansivu
Maybe you could check your mailing list settings, if you have any
autoresponse settings there. Only the subject of that message came to
the list, and according to Google Translate it's chinese and says:
"This is an auto-response e-mail"

I haven't got that kind of autoresponse e-mail when I joined to
mailing list, used default  settings and have sent message to mailing
list.

- Lauri

2008/4/15, Ken <[EMAIL PROTECTED]>:
> Every time I send a message to the sqlite list I get this goofy email sent 
> back to me.. Is this a problem with the List or something on my end?
>
>  Thanks,
>  Ken
>
>
>  Note: forwarded message attached.
> ___
>  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] Transaction across threads

2008-04-15 Thread Shawn Wilsher
> 1) If shared, then the second threads insert is part of the transaction and 
> should succeed.
>  2) No.
>  3) If the connection is shared between threads, there can only be 1 txn at a 
> time. The second threads attempt to begin a txn will result in an error that 
> indicates a txn is already active.
To be clear, when using a shared cache and more than one sqlite3
connection object, only one transaction will exist at a time, correct?
 However, if it is not using the shared cache, you can have a
transaction opened up for each thread?

Cheers,

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


MAIL PROBLEM??? Fwd: "����һ���Զ��ظ��ʼ�"

2008-04-15 Thread Ken
Every time I send a message to the sqlite list I get this goofy email sent back 
to me.. Is this a problem with the List or something on my end?

Thanks,
Ken


Note: forwarded message attached.___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Connection Sharing across threads

2008-04-15 Thread Ken
Yes this is possible. But it can not be conncurrent! The db connection must be 
prevented from being acted upon concurrently by your application. In other 
words it should be treated as a critical resource not for sharing. Access 
should be mutually exclusive amounst threads.



Shailesh Birari <[EMAIL PROTECTED]> wrote: Can some one tell me if the sharing 
of connection  is possible even when
the shared cache mode is disabled?

-Shailersh 

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Shailesh Birari
> Sent: Monday, April 14, 2008 11:24 PM
> To: sqlite-users@sqlite.org
> Subject: [sqlite] Connection Sharing across threads
> 
> In one of the wiki entries,
> http://www.sqlite.org/cvstrac/wiki?p=MultiThreading
>  , I 
> read that application cannot share the sqlite connection 
> across threads. However in another posting at 
> http://www.sqlite.org/sharedcache.html
>   I read that with 
> 3.5.0 update, the connection can be shared. 
> 
> >>>
> 
> In version 3.5.0, shared-cache mode was modified so that the 
> same cache can be shared across an entire process rather than 
> just within a single thread. Prior to this change, there were 
> restrictions on passing database connections between threads. 
> Those restrictions were dropped in 3.5.0 update. This 
> document describes shared-cache mode as of version 3.5.0.
> 
> >>>
> 
> Is the sharing of connection possible even when the shared 
> cache mode is disabled? or is it possible only when shared 
> cache is enablesd?
> 
>  
> 
> Kindly let me know 
> 
>  
> 
> regards
> 
> Shailesh
> 
> ___
> 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

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


Re: [sqlite] Transaction across threads

2008-04-15 Thread Ken
1) If shared, then the second threads insert is part of the transaction and 
should succeed.
2) No.
3) If the connection is shared between threads, there can only be 1 txn at a 
time. The second threads attempt to begin a txn will result in an error that 
indicates a txn is already active.



Shailesh Birari <[EMAIL PROTECTED]> wrote: Does anyone have any answers for the 
queries below?

-Shailesh 

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Shailesh Birari
> Sent: Monday, April 14, 2008 9:55 PM
> To: sqlite-users@sqlite.org
> Subject: [sqlite] Transaction across threads
> 
> Hello,
> I had a doubt of sqlite transactions across threads. 
> I have a multithreaded application which shares the same 
> sqlite connection across threads. I had a few doubts
> 1) If I do a begin transaction and insert on one thread. Then 
> do a insert on the second thread and finally a commit on the 
> first thread will the insert from the second thread succeed 
> or will it fail saying SQLITE_BUSY? if it succeeds, will the 
> insert on the second thread be a part of the transaction on 
> the first thread?
> 2) When I do a Begin transaction will I get a transactionId? 
> 3) If one thread is in the middle of a transaction and 
> another thread does a begin transaction, will it be able to 
> start its own transaction or will it fail with SQLITE_BUSY.?
>  
> Kindly let me know, 
>  
> Regards,
> Shailesh.
> ___
> 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

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


[sqlite] http://crlab.com/dotconnect/sqlite/forum

2008-04-15 Thread Core Lab

April 8, 2008 - Core Lab Software Development proudly presents the final
release of the new member of ADO.NET data providers family: dotConnect for
SQLite. From now on you can access the popular SQLite database engine with
the standard ADO.NET interface you are used to. This reveals new
capabilities to your applications, because the same code you wrote for SQL
servers now works for local data storages!

dotConnect for SQLite is an enhanced data provider for SQLite that builds on
ADO.NET technology to present a complete solution for developing
SQLite-based database applications. As a part of the Core Lab database
application development framework, dotConnect for SQLite offers both high
performance native connectivity to the SQLite database and a number of
innovative development tools and technologies.

dotConnect for SQLite supports and will support the ADO.NET Entity Framework
in its most up-to-date state. The product includes clear and simple demo
projects that will help you start with SQLite applications right away.

In the final release we have thoroughly tested the product, cleared out the
code and improved performance. The documentation has been greatly enriched
with SQLite-specific information.

Now we propose the Standard edition of dotConnect for SQLite for free. You
are welcome to evaluate the 
http://crlab.com/dotconnect/sqlite/download.html Trial Edition , which
incorporates all the advanced features of the Professional Edition.

For detailed information on dotConnect for SQLite please refer to the 
http://crlab.com/dotconnect/sqlite/ product pages . If you wish to provide
feedback on the new version, you can do it in our 
http://crlab.com/dotconnect/sqlite/forum forum  or by e-mail. We are always
glad to hear your comments and take into account your development needs.
-- 
View this message in context: 
http://www.nabble.com/http%3A--crlab.com-dotconnect-sqlite-forum-tp16700235p16700235.html
Sent from the SQLite mailing list archive at Nabble.com.

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


Re: [sqlite] SQL Quick Review/Reference

2008-04-15 Thread Martin Jenkins
metro wrote:
> is this what everybody is looking for??
> http://booksforpeople.blogspot.com/2008/03/definitive-guide-to-sqlite-free-book.html
> there are other sources  for free ebooks
>
> Laurie
>   
It did the rounds on alt.binaries.e-book.technical last year. The 
buyer's email address had been removed from
the page footers but otherwise it looked like my legit copy, ie it 
wasn't a scan.

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


Re: [sqlite] SQL Quick Review/Reference

2008-04-15 Thread Martin Jenkins
Mike Owens wrote:
>> Mike Owens wrote:
>>  > I've been lobbying Apress to release the book in electronic form for
>>  > free. 
>>  That seems a bit extreme 
> I wasn't referring to releasing the book as an exclusive solution to
> the index problem, but rather for the community and SQLite in general.
>   
That's fair enough - sorry for the misunderstanding on my part.
> Fixing the index issue would just be a nice dividend. 
Indeed. I've not had any issues with it but I tend to remember roughly 
where things are in books.
I read quickly so I don't mind reading a few extra pages - useful as a 
refresher.
> making it a good book 
I think it's a fine book. I know one or two "occasional" posters on this 
list made some negative
comments (index issues apart) but I think they made a mistake and bought 
the wrong book... ;)

Martin

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


Re: [sqlite] SQL Quick Review/Reference

2008-04-15 Thread Neville Franks
The book is sitting on a server in China and I would have to assume it
is an illegal copy. Not something folks here should be using.


Tuesday, April 15, 2008, 7:58:03 PM, you wrote:

m> is this what everybody is looking for??
m> 
http://booksforpeople.blogspot.com/2008/03/definitive-guide-to-sqlite-free-book.html
m> there are other sources  for free ebooks

m> Laurie


m> Mike Owens wrote:
>> On Mon, Apr 14, 2008 at 8:45 AM, Martin Jenkins <[EMAIL PROTECTED]> wrote:
>>   
>>> Mike Owens wrote:
>>>  > I've been lobbying Apress to release the book in electronic form for
>>>  > free. It's currently under consideration, but I've not heard anything
>>>  > back yet.
>>>  >
>>>  That seems a bit extreme - how about a user generated/funded index on
>>>  the web somewhere?
>>>  Download and print a PDF, stick it in the back of the book and...
>>> 
>>
>> I wasn't referring to releasing the book as an exclusive solution to
>> the index problem, but rather for the community and SQLite in general.
>> Fixing the index issue would just be a nice dividend. I am indebted to
>> Apress for picking up the book and putting substantial resources into
>> making it a good book (they truly made it a much better book than it
>> ever would have been otherwise), and I would like to see them recoup
>> their costs and benefit in any way they so desire. But I couldn't care
>> less for any gain on my part. I wrote the book for SQLite. Don't get
>> me wrong, I jumped at the chance to write a book when offered to me,
>> but my main concern is that the book helps people and furthers the
>> project. As long as I can avoid getting vilified on Amazon, I'm happy.
>> Ultimately, I would love to see this book turn out like the "Dive Into
>> Python" book, which is available online, or the
>> Subversion/Samba/Asterisk books. I think it is in keeping with the
>> open source philosophy. But the decision in this case is not mine
>> alone to make. Regardless of their decision, I applaud Apress for
>> their continued efforts in supporting books on open source software,
>> and the people who reward their efforts by purchasing them.
>>
>> -- Mike
>>
>> On Mon, Apr 14, 2008 at 8:45 AM, Martin Jenkins <[EMAIL PROTECTED]> wrote:
>>   
>>> Mike Owens wrote:
>>>  > I've been lobbying Apress to release the book in electronic form for
>>>  > free. It's currently under consideration, but I've not heard anything
>>>  > back yet.
>>>  >
>>>  That seems a bit extreme - how about a user generated/funded index on
>>>  the web somewhere?
>>>  Download and print a PDF, stick it in the back of the book and...
>>>
>>>  Martin
>>>
>>>
>>> ___
>>>  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
>>
>>   

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



-- 
Best regards,
  Neville Franks, http://www.surfulater.com http://blog.surfulater.com
 

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


Re: [sqlite] SQL Quick Review/Reference

2008-04-15 Thread metro
is this what everybody is looking for??
http://booksforpeople.blogspot.com/2008/03/definitive-guide-to-sqlite-free-book.html
there are other sources  for free ebooks

Laurie


Mike Owens wrote:
> On Mon, Apr 14, 2008 at 8:45 AM, Martin Jenkins <[EMAIL PROTECTED]> wrote:
>   
>> Mike Owens wrote:
>>  > I've been lobbying Apress to release the book in electronic form for
>>  > free. It's currently under consideration, but I've not heard anything
>>  > back yet.
>>  >
>>  That seems a bit extreme - how about a user generated/funded index on
>>  the web somewhere?
>>  Download and print a PDF, stick it in the back of the book and...
>> 
>
> I wasn't referring to releasing the book as an exclusive solution to
> the index problem, but rather for the community and SQLite in general.
> Fixing the index issue would just be a nice dividend. I am indebted to
> Apress for picking up the book and putting substantial resources into
> making it a good book (they truly made it a much better book than it
> ever would have been otherwise), and I would like to see them recoup
> their costs and benefit in any way they so desire. But I couldn't care
> less for any gain on my part. I wrote the book for SQLite. Don't get
> me wrong, I jumped at the chance to write a book when offered to me,
> but my main concern is that the book helps people and furthers the
> project. As long as I can avoid getting vilified on Amazon, I'm happy.
> Ultimately, I would love to see this book turn out like the "Dive Into
> Python" book, which is available online, or the
> Subversion/Samba/Asterisk books. I think it is in keeping with the
> open source philosophy. But the decision in this case is not mine
> alone to make. Regardless of their decision, I applaud Apress for
> their continued efforts in supporting books on open source software,
> and the people who reward their efforts by purchasing them.
>
> -- Mike
>
> On Mon, Apr 14, 2008 at 8:45 AM, Martin Jenkins <[EMAIL PROTECTED]> wrote:
>   
>> Mike Owens wrote:
>>  > I've been lobbying Apress to release the book in electronic form for
>>  > free. It's currently under consideration, but I've not heard anything
>>  > back yet.
>>  >
>>  That seems a bit extreme - how about a user generated/funded index on
>>  the web somewhere?
>>  Download and print a PDF, stick it in the back of the book and...
>>
>>  Martin
>>
>>
>> ___
>>  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
>
>   

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


Re: [sqlite] delete rows but the database files still have the big size

2008-04-15 Thread Paul Smith
Joanne Pham wrote:
> Do I miss some commands here? I thought the database file size shoud get much 
> smaller after the delete operation but it isn't.
> Can you please help to let me know how to get the database file szie smaller.
> I have tried "VACUUM" but the file's size didn't change.
>   
VACUUM should do it.

When you delete rows, the file size won't change (this is common with 
most database engines) as that would require a lot of extra work (ie all 
the bits at the end of the file which are still in use will need moving 
into all the gaps which are now unused). VACUUM does that for you, but 
requires exclusive access to the database. DELETE doesn't do it, or it 
would be really time consuming. DELETE just marks the gaps as unused, so 
they can be re-used later.

Did you make sure that nothing else was using the database before you 
ran VACUUM on it?


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


Re: [sqlite] Connection Sharing across threads

2008-04-15 Thread Shailesh Birari
Can some one tell me if the sharing of connection  is possible even when
the shared cache mode is disabled?

-Shailersh 

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Shailesh Birari
> Sent: Monday, April 14, 2008 11:24 PM
> To: sqlite-users@sqlite.org
> Subject: [sqlite] Connection Sharing across threads
> 
> In one of the wiki entries,
> http://www.sqlite.org/cvstrac/wiki?p=MultiThreading
>  , I 
> read that application cannot share the sqlite connection 
> across threads. However in another posting at 
> http://www.sqlite.org/sharedcache.html
>   I read that with 
> 3.5.0 update, the connection can be shared. 
> 
> >>>
> 
> In version 3.5.0, shared-cache mode was modified so that the 
> same cache can be shared across an entire process rather than 
> just within a single thread. Prior to this change, there were 
> restrictions on passing database connections between threads. 
> Those restrictions were dropped in 3.5.0 update. This 
> document describes shared-cache mode as of version 3.5.0.
> 
> >>>
> 
> Is the sharing of connection possible even when the shared 
> cache mode is disabled? or is it possible only when shared 
> cache is enablesd?
> 
>  
> 
> Kindly let me know 
> 
>  
> 
> regards
> 
> Shailesh
> 
> ___
> 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] Transaction across threads

2008-04-15 Thread Shailesh Birari
Does anyone have any answers for the queries below?

-Shailesh 

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Shailesh Birari
> Sent: Monday, April 14, 2008 9:55 PM
> To: sqlite-users@sqlite.org
> Subject: [sqlite] Transaction across threads
> 
> Hello,
> I had a doubt of sqlite transactions across threads. 
> I have a multithreaded application which shares the same 
> sqlite connection across threads. I had a few doubts
> 1) If I do a begin transaction and insert on one thread. Then 
> do a insert on the second thread and finally a commit on the 
> first thread will the insert from the second thread succeed 
> or will it fail saying SQLITE_BUSY? if it succeeds, will the 
> insert on the second thread be a part of the transaction on 
> the first thread?
> 2) When I do a Begin transaction will I get a transactionId? 
> 3) If one thread is in the middle of a transaction and 
> another thread does a begin transaction, will it be able to 
> start its own transaction or will it fail with SQLITE_BUSY.?
>  
> Kindly let me know, 
>  
> Regards,
> Shailesh.
> ___
> 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