[sqlite] read uncommitted data consistency

2015-02-21 Thread Simon Slavin

On 21 Feb 2015, at 9:01pm, Yuriy Stelmakh  wrote:

> When using read uncommitted pragma, is it possible to get a row of data
> where some columns reflect state of that row at one point, while others at
> another? For example when you are reading in one thread while writing in
> another.

No.  They'll all be either one thing or the other.  In other words, even with 
the PRAGMA set, SQLite is still transaction-safe.  It uses a lock on the entire 
database to prevent the problem you described.

Simon.


[sqlite] Sqlite3 tutorial and reference manuals?

2015-02-21 Thread russ lyttle
Thanks.
I doing building automation using Raspberry Pi, Arduino, and zigbee
devices. I started with Python, but that is too slow, so I would like to
move to C++. Dropped messages are not acceptable, and response to user
actions needs to be "timely".

I'll hold futher questions until after looking at the recommendations my
by you kind people.



On 02/21/2015 01:36 PM, Paolo Bolzoni wrote:
> About SQL I like the w3c schools[1]; about sqlite how do you want to
> use it? Via C interface? If so, check the website "sqlite in 5 minutes
> or less"[2].
> 
> [1]http://www.w3schools.com/sql/
> [2]https://www.sqlite.org/quickstart.html
> 
> On Sat, Feb 21, 2015 at 7:33 PM, russ lyttle  wrote:
>> I'm new to sqlite and not that experienced with SQL in general. Are
>> there any good sqlite tutorials or references better than the first few
>> pages returned by a google search?
>>
>> I have reference and tutorial books for MySql.
>>
>>
>> ___
>> sqlite-users mailing list
>> sqlite-users at mailinglists.sqlite.org
>> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>>
> ___
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
> 


-- next part --
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: 
<http://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-users/attachments/20150221/752f584b/attachment.pgp>


[sqlite] Sqlite3 tutorial and reference manuals?

2015-02-21 Thread russ lyttle

Thanks for the recommendation. Sorry about the multiple postings, but
thunderbird was telling me it couldn't send the messages. I think I've
got it fixed now.

On 02/21/2015 01:48 PM, Conery John wrote:
> I really like Using SQLite, by Jay Kreibich (O?Reilly and Associates).  
> Comprehensive coverage of SQLite plus useful information on database design.
> 
> John Conery
> 
>> On Feb 21, 2015, at 10:36 AM, Paolo Bolzoni > gmail.com> wrote:
>>
>> About SQL I like the w3c schools[1]; about sqlite how do you want to
>> use it? Via C interface? If so, check the website "sqlite in 5 minutes
>> or less"[2].
>>
>> [1]http://www.w3schools.com/sql/
>> [2]https://www.sqlite.org/quickstart.html
>>
>> On Sat, Feb 21, 2015 at 7:33 PM, russ lyttle  wrote:
>>> I'm new to sqlite and not that experienced with SQL in general. Are
>>> there any good sqlite tutorials or references better than the first few
>>> pages returned by a google search?
>>>
>>> I have reference and tutorial books for MySql.
>>>
>>>
>>> ___
>>> sqlite-users mailing list
>>> sqlite-users at mailinglists.sqlite.org
>>> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>>>
>> ___
>> sqlite-users mailing list
>> sqlite-users at mailinglists.sqlite.org
>> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
> 
> ___
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
> 


-- next part --
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: 
<http://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-users/attachments/20150221/5963113a/attachment.pgp>


[sqlite] read uncommitted data consistency

2015-02-21 Thread Yuriy Stelmakh
When using read uncommitted pragma, is it possible to get a row of data
where some columns reflect state of that row at one point, while others at
another? For example when you are reading in one thread while writing in
another.

Thank you!


[sqlite] Sqlite3 tutorial and reference manuals?

2015-02-21 Thread Paolo Bolzoni
About SQL I like the w3c schools[1]; about sqlite how do you want to
use it? Via C interface? If so, check the website "sqlite in 5 minutes
or less"[2].

[1]http://www.w3schools.com/sql/
[2]https://www.sqlite.org/quickstart.html

On Sat, Feb 21, 2015 at 7:33 PM, russ lyttle  wrote:
> I'm new to sqlite and not that experienced with SQL in general. Are
> there any good sqlite tutorials or references better than the first few
> pages returned by a google search?
>
> I have reference and tutorial books for MySql.
>
>
> ___
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>


[sqlite] read uncommitted data consistency

2015-02-21 Thread Jay Kreibich

On Feb 21, 2015, at 5:36 PM, Simon Slavin  wrote:

> 
> On 21 Feb 2015, at 9:01pm, Yuriy Stelmakh  wrote:
> 
>> When using read uncommitted pragma, is it possible to get a row of data
>> where some columns reflect state of that row at one point, while others at
>> another? For example when you are reading in one thread while writing in
>> another.
> 
> No.  They'll all be either one thing or the other.  In other words, even with 
> the PRAGMA set, SQLite is still transaction-safe.  It uses a lock on the 
> entire database to prevent the problem you described.
> 


No, not with columns, but it is possible with rows, depending on how the two 
treads are interacting.

SQLite rows are essentially self-contained, so any time a row is updated it is 
updated as a complete unit.  This is not true of rows within a table, however.  

Understand that READ UNCOMMITTED only applies to connections within the same 
process that are also using a shared cache (sqlite3_enable_shared_cache()).  
If, in the situation you describe, the threads are using different connections 
that are NOT using a shared cache, then the writer thread will ?see? any 
updates it has already made within the uncommitted transaction, while another 
reader thread (using a different connection) will not? it will see the data as 
it existed when the transaction was started.  This has nothing to do with READ 
UNCOMMITTED, however, that?s how it always works when not using a shared cache 
(or when not using the same connection for reads and writes).

Basically the connection context that created the transaction will see the 
actions it has performed, while all other connections will not see the changes 
until the transaction is committed (which, of course, is the whole point of 
transactions).

 -j


--  
Jay A. Kreibich < J A Y @ K R E I B I.C H >

"Intelligence is like underwear: it is important that you have it, but showing 
it to the wrong people has the tendency to make them feel uncomfortable." -- 
Angela Johnson







[sqlite] Reference material for SQLITE3

2015-02-21 Thread Igor Tandetnik
On 2/21/2015 1:43 PM, russ lyttle wrote:
> I'm new to sqlite and would like some intermediate to advanced tutorial
> and reference material.

http://sqlite.org/docs.html
-- 
Igor Tandetnik



[sqlite] Reference material for SQLITE3

2015-02-21 Thread russ lyttle
I'm new to sqlite and would like some intermediate to advanced tutorial
and reference material. Google didn't return much useful beyond
elementary level.

-- next part --
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: 
<http://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-users/attachments/20150221/33762c89/attachment.pgp>


[sqlite] Email Removal

2015-02-21 Thread Mike Brittain
Please remove me from all of your email lists.

Thanks


[sqlite] sqlite tutorials and reference manuals?

2015-02-21 Thread russ lyttle
I'm new to sqlite. Can anyone recommend online or hardcopy tutorials and
reference manuals for sqlite?
Google search hasn't returned much useful.

-- next part --
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: 
<http://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-users/attachments/20150221/ec3c1906/attachment.pgp>


[sqlite] Sqlite3 tutorial and reference manuals?

2015-02-21 Thread russ lyttle
I'm new to sqlite and not that experienced with SQL in general. Are
there any good sqlite tutorials or references better than the first few
pages returned by a google search?

I have reference and tutorial books for MySql.

-- next part --
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: 
<http://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-users/attachments/20150221/9356a802/attachment.pgp>


[sqlite] Sqlite3 tutorial and reference manuals?

2015-02-21 Thread Conery John
I really like Using SQLite, by Jay Kreibich (O?Reilly and Associates).  
Comprehensive coverage of SQLite plus useful information on database design.

John Conery

> On Feb 21, 2015, at 10:36 AM, Paolo Bolzoni  gmail.com> wrote:
> 
> About SQL I like the w3c schools[1]; about sqlite how do you want to
> use it? Via C interface? If so, check the website "sqlite in 5 minutes
> or less"[2].
> 
> [1]http://www.w3schools.com/sql/
> [2]https://www.sqlite.org/quickstart.html
> 
> On Sat, Feb 21, 2015 at 7:33 PM, russ lyttle  wrote:
>> I'm new to sqlite and not that experienced with SQL in general. Are
>> there any good sqlite tutorials or references better than the first few
>> pages returned by a google search?
>> 
>> I have reference and tutorial books for MySql.
>> 
>> 
>> ___
>> sqlite-users mailing list
>> sqlite-users at mailinglists.sqlite.org
>> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>> 
> ___
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users