Re: [sqlite] The SQL Guide to SQLite

2009-07-18 Thread Rick Ratchford
Greetings Neville- (thanks for changing the subject. :) I'm only a few pages into the book. Before I went deeper, I just wanted to get a handle on the [...] notations. The first few pages are quite informative. Let me get deeper into the book and I'll be glad to share my thoughts on it here.

Re: [sqlite] The SQL Guide to SQLite

2009-07-18 Thread Neville Franks
Rick, Changing the conversation a little I would be interested to know your opinion of this book, as I'm sure would others. Many were disappointed with "The Definitive Guide to SQLite". Sunday, July 19, 2009, 11:56:05 AM, you wrote: RR> Okay. We're talking two different things here. RR> One

Re: [sqlite] The SQL Guide to SQLite

2009-07-18 Thread Rick Ratchford
Okay. We're talking two different things here. One states "academic papers" and you state "technical documents". This is a "book", not an "academic paper or technical document". I'm all for Names and Dates. I'm quite familiar with (Williams and Jones 1981) and other such references. They appear

Re: [sqlite] The SQL Guide to SQLite

2009-07-18 Thread Rich Shepard
On Sat, 18 Jul 2009, Rick Ratchford wrote: > All I know is that this is a book. I have a vast library of technical > books and this is the ONLY one that uses this convention. Even my copy of > "A New Kind of Science" by Wolfram doesn't use this convention. :-b There are many conventions for

Re: [sqlite] The SQL Guide to SQLite

2009-07-18 Thread Rick Ratchford
Perhaps its true that its common in academic papers. I wouldn't know as I've never read one. All I know is that this is a book. I have a vast library of technical books and this is the ONLY one that uses this convention. Even my copy of "A New Kind of Science" by Wolfram doesn't use this

Re: [sqlite] very large SQLite tables

2009-07-18 Thread Christian Smith
On Wed, Jun 24, 2009 at 02:21:09PM -0500, Matthew O'Keefe wrote: > > > We are using SQLite for indexing a huge number (i.e., 100 million to 1 > billion) of key pairs > that are represented by an 88-byte key. We are using a single table with a > very large number of rows (one for each data

Re: [sqlite] The SQL Guide to SQLite

2009-07-18 Thread Thomas Briggs
That's pretty common in academic papers, actually. -T On 7/18/09, Rick Ratchford wrote: > Yes. You are correct. That is what they are. > > Thanks for pointing this out. It probably should have been made clear at > the > beginning of the book since this is not

Re: [sqlite] Strange index creation/insertion performance between Windows and Linux 64-bit

2009-07-18 Thread Brian Dantes
Thanks for the replies. - All insertions are within a transaction - Database was originally created on Linux (with a 1K page size) and copied to Windows - Changing the page size to 4K (and vacuuming) lowered the index creation time on Windows to 50 seconds and on Linux to 5.5 minutes.

Re: [sqlite] SQLite3 replication

2009-07-18 Thread Simon Slavin
On 18 Jul 2009, at 8:27pm, Ken wrote: > The "journal" file for sqlite is not a redo journal but rather an > undo journal. So it is not really possible to use the journal to > replicate. I agree. > However, if one were to hack the code and open a redo file along > with the journal file.

[sqlite] Resolve: problem getting triggers to work

2009-07-18 Thread Jim Showalter
Android team screwed up. I filed: http://code.google.com/p/android/issues/detail?id=3302 ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Multiple Writers and Database is Locked Problems

2009-07-18 Thread Ken
I like to start each of my transactions with a "Begin Immediate" that way the database file is locked at that point. And its relatively simple to test for the DB locked at that stage and handle waiting or returning an error. HTH --- On Fri, 7/17/09, Cole wrote: > From:

Re: [sqlite] SQLite3 replication

2009-07-18 Thread Ken
Kelly, The "journal" file for sqlite is not a redo journal but rather an undo journal. So it is not really possible to use the journal to replicate. However, if one were to hack the code and open a redo file along with the journal file. Then write the source blocks out as well. This could

Re: [sqlite] SQLite3 immune from injection attacks if file isreadonly?

2009-07-18 Thread Igor Tandetnik
Igor Tandetnik wrote: > Kelly Jones wrote: >> On a website, I want to take a user's query "as is", save it to a >> userquery.txt, and then do: >> >> sqlite3 /path/to/mydb < userquery.txt >> >> where /path/to/mydb is a *read-only* file. >> >> Is there *any* risk of an injection attack here? >> >>

[sqlite] Updated info on getting trigger to work

2009-07-18 Thread Jim Showalter
I dumped the SQL being executed to a file: drop table if exists Words; create table Words (_id integer primary key autoincrement, text text not null unique); create trigger ut_Words_cannotChangeWordTextOnUpdate before update on Words for each row begin select raise(rollback, 'update on table

Re: [sqlite] SQLite3 immune from injection attacks if file is readonly?

2009-07-18 Thread Igor Tandetnik
Kelly Jones wrote: > On a website, I want to take a user's query "as is", save it to a > userquery.txt, and then do: > > sqlite3 /path/to/mydb < userquery.txt > > where /path/to/mydb is a *read-only* file. > > Is there *any* risk of an injection attack here? > > Specifically, does sqlite3 have any

[sqlite] SQLite3 replication

2009-07-18 Thread Kelly Jones
Is there any way to real-time replicate SQLite3 dbs across servers? I realize I could just rsync constantly, but this seems inefficient. I know SQLite3 uses a journal when making changes: could I use this journal for replication, similar to how MySQL uses bin-logging for replication? -- We're

[sqlite] SQLite3 immune from injection attacks if file is readonly?

2009-07-18 Thread Kelly Jones
On a website, I want to take a user's query "as is", save it to a userquery.txt, and then do: sqlite3 /path/to/mydb < userquery.txt where /path/to/mydb is a *read-only* file. Is there *any* risk of an injection attack here? Specifically, does sqlite3 have any shell escapes or any way to change

Re: [sqlite] The SQL Guide to SQLite

2009-07-18 Thread Rick Ratchford
Yes. You are correct. That is what they are. Thanks for pointing this out. It probably should have been made clear at the beginning of the book since this is not common in the majority of books I own purchased here in the US. Thanks again. Rick #>-Original Message- #>From:

Re: [sqlite] The SQL Guide to SQLite

2009-07-18 Thread Igor Tandetnik
Rick Ratchford wrote: > I just received my copy of the new book "The SQL Guide to SQLite" by > Rick F. van der Lans. > > There are many references within the book that are contained in square > brackets and some sort of keyword or code. > > Example: "...written about SQLite; see for example

[sqlite] The SQL Guide to SQLite

2009-07-18 Thread Rick Ratchford
Greetings! I just received my copy of the new book "The SQL Guide to SQLite" by Rick F. van der Lans. There are many references within the book that are contained in square brackets and some sort of keyword or code. Example: "...written about SQLite; see for example [NEWM05] and [OWEN06]."

Re: [sqlite] SQLite 3.6.16 and the Asynchronous I/O transaction fails with multiple database files

2009-07-18 Thread Dan
On Jul 18, 2009, at 1:28 AM, Alessandro Merolli wrote: > I'm trying to use the asynchronous I/O extension with the latest > SQLite version for the first time in my project. > This project is using database files attached into one database > connection. > I start a transaction which involves two

Re: [sqlite] Strange index creation/insertion performance between Windows and Linux 64-bit

2009-07-18 Thread Jay A. Kreibich
On Sat, Jul 18, 2009 at 12:22:08AM -0700, Brian Dantes scratched on the wall: > I have a largish DB around 1GB in size. There is a table with 5 million rows > in it that has a 3-key index on it. This database file is fragmented -- to > what degree I'm not sure. > > Using sqlite 3.6.14, dropping

Re: [sqlite] Strange index creation/insertion performance between Windows and Linux 64-bit

2009-07-18 Thread Simon Slavin
On 18 Jul 2009, at 8:22am, Brian Dantes wrote: > I have a largish DB around 1GB in size. There is a table with 5 > million rows > in it that has a 3-key index on it. This database file is fragmented > -- to > what degree I'm not sure. > > Using sqlite 3.6.14, dropping and recreating the

[sqlite] Error:1067

2009-07-18 Thread avir
Hi!! i am making a desktop application(offline) using Adobe AIR1.5,Flex builder. i am storing data locally ,but i am getting error which is: Error #1067 implicit coercion of a value of type Class to an unrelated type flash.events:SQLEvent The code for this is as follows:

Re: [sqlite] Problem getting trigger to work

2009-07-18 Thread Simon Slavin
Quick note: Please do not set 'reply-to' like that when using a discussion list. It's important if a question is posted to the list, answers to it get posted to the list. This is so that if the first answer to a question is wrong, someone else can see it and post a correction. It also

Re: [sqlite] Problem getting trigger to work

2009-07-18 Thread Kees Nuyt
On Fri, 17 Jul 2009 23:46:31 -0700, "Jim Showalter" wrote: > >It's an update. > >The Java code for my DataAccessor (a lightweight wrapper over >Android's wrapper over SQLite) checks the ID. If the ID is set to -1, >it's an insert, otherwise it's an update. > >A Word

Re: [sqlite] Strange index creation/insertion performance between Windows and Linux 64-bit

2009-07-18 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Brian Dantes wrote: > Can anyone offer any explanations for these huge disparities in sqlite > performance on these two platforms? Run the SQLite analyser (available from the download page) on the resulting databases and see what it says is

[sqlite] Strange index creation/insertion performance between Windows and Linux 64-bit

2009-07-18 Thread Brian Dantes
I have a largish DB around 1GB in size. There is a table with 5 million rows in it that has a 3-key index on it. This database file is fragmented -- to what degree I'm not sure. Using sqlite 3.6.14, dropping and recreating the index under WinXP Pro (on a local disk) with no other activity takes

Re: [sqlite] Problem getting trigger to work

2009-07-18 Thread Jim Showalter
It's an update. The Java code for my DataAccessor (a lightweight wrapper over Android's wrapper over SQLite) checks the ID. If the ID is set to -1, it's an insert, otherwise it's an update. A Word (word2) has been previously saved, and its ID has been saved to word2Id. The test code is

Re: [sqlite] Problem getting trigger to work

2009-07-18 Thread Simon Slavin
On 18 Jul 2009, at 4:32am, Jim Showalter wrote: > create table words > ( >_id integer primary key autoincrement, >wordText text not null unique > ); > > I have triggers that work, which I got from > http://www.sqlite.org/cvstrac/wiki?p=ForeignKeyTriggers. > > Now I'm trying to modify the