Re: [sqlite] pragma vs select for introspection

2010-12-13 Thread Darren Duncan
Wols Lists wrote: > On 13/12/10 22:44, Darren Duncan wrote: >> I am also very interested in these subjects. >> >> I believe that the relational model can accurately model anything in >> the real world, and that this can be implemented in efficient ways, >> with physical structure taking hints f

Re: [sqlite] pragma vs select for introspection

2010-12-13 Thread Wols Lists
On 13/12/10 22:44, Darren Duncan wrote: > I am also very interested in these subjects. > > I believe that the relational model can accurately model anything in > the real world, and that this can be implemented in efficient ways, > with physical structure taking hints from logical structure. But c

Re: [sqlite] pragma vs select for introspection

2010-12-13 Thread Darren Duncan
Wols Lists wrote: > Personally, I believe relational *technology* is fatally flawed by > design - there's nothing wrong with the maths, but you can't do > astronomy with classical physics and you can't do large information > stores with set theory :-) > > I know that's flame-bait, but let's quickl

Re: [sqlite] pragma vs select for introspection

2010-12-13 Thread Puneet Kishor
Scott Hess wrote: > On Mon, Dec 13, 2010 at 1:27 PM, Puneet Kishor wrote: >> Wols Lists wrote: >>> On 13/12/10 01:38, Darren Duncan wrote: Darren Duncan wrote: > Wols Lists wrote: >> Dunno how well that approach translates into a relational engine, >> because Pick has several ve

Re: [sqlite] pragma vs select for introspection

2010-12-13 Thread Scott Hess
On Mon, Dec 13, 2010 at 1:27 PM, Puneet Kishor wrote: > Wols Lists wrote: >> On 13/12/10 01:38, Darren Duncan wrote: >>> Darren Duncan wrote: Wols Lists wrote: > Dunno how well that approach translates into a relational engine, > because Pick has several very non-relational quirks (ev

Re: [sqlite] pragma vs select for introspection

2010-12-13 Thread Puneet Kishor
Wols Lists wrote: > On 13/12/10 01:38, Darren Duncan wrote: >> Darren Duncan wrote: >>> Wols Lists wrote: Dunno how well that approach translates into a relational engine, because Pick has several very non-relational quirks (every "row" MUST have a primary key, the dictionary DEscr

Re: [sqlite] pragma vs select for introspection

2010-12-13 Thread Wols Lists
On 13/12/10 01:38, Darren Duncan wrote: > Darren Duncan wrote: >> Wols Lists wrote: >>> Dunno how well that approach translates into a relational engine, >>> because Pick has several very non-relational quirks (every "row" MUST >>> have a primary key, the dictionary DEscribes, not PREscribes the FI

Re: [sqlite] How to write Query to do this?

2010-12-13 Thread Puneet Kishor
steve mtangoo wrote: > I used your query and devised this which works: > > SELECT * FROM Bible WHERE ID BETWEEN > (SELECT ID FROM Bible WHERE Book=64 AND Chapter=1 AND Verse=1) > AND > (SELECT ID FROM Bible WHERE Book=66 AND Chapter=1 AND Verse=3); > You might also want to redefine your table s

Re: [sqlite] How to write Query to do this?

2010-12-13 Thread Ryan Johnson
On 12/13/2010 11:17 AM, Stefano Mtangoo wrote: > Thanks Dr. and I'm checking the zip file. But to be frank, I don't > understand the calculation done below. How do I come to such claculation > (excuse my ignorance)? also how do I query that simple BETWEEN? > That seems to be easiest way but I haven

Re: [sqlite] How to write Query to do this?

2010-12-13 Thread Stefano Mtangoo
Thanks Dr. and I'm checking the zip file. But to be frank, I don't understand the calculation done below. How do I come to such claculation (excuse my ignorance)? also how do I query that simple BETWEEN? That seems to be easiest way but I haven't grasped it yet Thanks On Mon, Dec 13, 2010 at 9:02

Re: [sqlite] How to write Query to do this?

2010-12-13 Thread Richard Hipp
On Mon, Dec 13, 2010 at 9:04 AM, Puneet Kishor wrote: > > > steve mtangoo wrote: > > I have a script that is supposed to query the Bible scriptures between > two > > intervals. My table is named Bible and have columns: ID (int), Book > (int), > > Chapter(int), Verse (int) and Scripture(text).

Re: [sqlite] Reg: Queries On Sqlite With Java

2010-12-13 Thread Puneet Kishor
Srihari Bandi wrote: > Hi , > > I would like to know some information on Sqlite. I trying to change > all *microsoft > db* to *Sqlite db* using *Java* in my project. > > Below are some clarification required. >>> What is the difference between *.db, .sqlite& Inmemeory* sqlite file ? >>> Latest

Re: [sqlite] Reg: Queries On Sqlite With Java

2010-12-13 Thread steve mtangoo
Have you visited www.sqlite.org ? Almost all your questions have answers there On Mon, Dec 13, 2010 at 7:59 PM, Srihari Bandi wrote: > Hi , > > I would like to know some information on Sqlite. I trying to change > all *microsoft > db* to *Sqlite db* using *Java* in my project. > > Below are some

[sqlite] Compile warning -- signed overflow

2010-12-13 Thread Black, Michael (IS)
Compiling version 3.7.3...this warning has actually been around a while though I can't find anybody reporting it for sqlite3... gcc44 -O3 -Wall -fPIC -DNO_GETTOD -c sqlite3.c sqlite3.c: In function âfkLookupParentâ: sqlite3.c:55430: warning: assuming signed overflow does not occur when assuming

[sqlite] Reg: Queries On Sqlite With Java

2010-12-13 Thread Srihari Bandi
Hi , I would like to know some information on Sqlite. I trying to change all *microsoft db* to *Sqlite db* using *Java* in my project. Below are some clarification required. >> What is the difference between *.db, .sqlite & Inmemeory* sqlite file ? >> Latest Sqlite Version? >> Sqlite License Ter

Re: [sqlite] How to optimize this simple select query ?

2010-12-13 Thread Puneet Kishor
Vander Clock Stephane wrote: > Hello, > > But i not understand how the R* tree based table can help me here ? The BETWEEN queries are specifically optimized by R*Tree. > > can you explain me ? > > thanks you by advance > stephane > > On 12/9/2010 8:24 PM, Gabríel A. Pétursson wrote: >> It seem

Re: [sqlite] How to optimize this simple select query ?

2010-12-13 Thread Vander Clock Stephane
Hello, But i not understand how the R* tree based table can help me here ? can you explain me ? thanks you by advance stephane On 12/9/2010 8:24 PM, Gabríel A. Pétursson wrote: > It seems to me that you may want to consider defining your table as a > virtual R* tree based table. > > See http://

Re: [sqlite] Import/Export with foreign keys

2010-12-13 Thread Duquette, William H (316H)
Oh, very cool! Thanks, Richard! On 12/13/10 8:26 AM, "Richard Hipp" wrote: If you make all of your FK constraints DEFERRABLE INITIALLY DEFERRED, then all the FK checking occurs at the conclusion of each transaction, not at the conclusion of each statement. Then if you do all your importing wi

Re: [sqlite] Import/Export with foreign keys

2010-12-13 Thread Richard Hipp
If you make all of your FK constraints DEFERRABLE INITIALLY DEFERRED, then all the FK checking occurs at the conclusion of each transaction, not at the conclusion of each statement. Then if you do all your importing within a single transaction, it won't matter what order you import things. On Mon

Re: [sqlite] Import/Export with foreign keys

2010-12-13 Thread Puneet Kishor
On 13 Dec 2010, at 4:07pm, Duquette, William H (316H) wrote: .. >> 4. If table A references itself, and I have two rows that >> reference each other (double-ugh!), the table might not >> be importable at all. > Ouroboros aka chicken-egg -- Puneet Kishor __

Re: [sqlite] Import/Export with foreign keys

2010-12-13 Thread Simon Slavin
On 13 Dec 2010, at 4:07pm, Duquette, William H (316H) wrote: > I've got an application > that regularly takes a number of tables and exports their > contents as plain text, and then later imports it again. If I > declare foreign key constraints and enable checking of > foreign key constraints, I

Re: [sqlite] EXTERNAL: Alphabetic Order

2010-12-13 Thread Black, Michael (IS)
See this: http://stackoverflow.com/questions/1188749/how-to-change-the-collation-of-sqlite3-database-to-sort-case-insensitively Michael D. Black Senior Scientist Advanced Analytics Directorate Northrop Grumman Information Systems From: sqlite-users-boun...@s

Re: [sqlite] Alphabetic Order

2010-12-13 Thread Simon Davies
On 13 December 2010 16:04, easinewe wrote: > > In my SQLite database file entries with small caps are listed at the end of > list after Z.  Additionally an entry with multiple caps like NBA appears > before something like Natalie.  How do I force it to list all these entries > in correct alphabeti

[sqlite] Import/Export with foreign keys

2010-12-13 Thread Duquette, William H (316H)
Howdy! I've been experimenting with SQLite3's foreign key support, and I want to check my understanding. I've got an application that regularly takes a number of tables and exports their contents as plain text, and then later imports it again. If I declare foreign key constraints and enable check

[sqlite] Alphabetic Order

2010-12-13 Thread easinewe
In my SQLite database file entries with small caps are listed at the end of list after Z. Additionally an entry with multiple caps like NBA appears before something like Natalie. How do I force it to list all these entries in correct alphabetical order? Any assistance would be much appreciated.

Re: [sqlite] How to write Query to do this?

2010-12-13 Thread steve mtangoo
I would like to thank all of you who helped me to achieve this. It took me a lot of time trying to figure out, but you guys have helped me a lot I will stick with mailing list! Thanks ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org

Re: [sqlite] How to write Query to do this?

2010-12-13 Thread steve mtangoo
Hahaha! A coincidence! Thanks! On Mon, Dec 13, 2010 at 6:30 PM, Gerry Snyder wrote: > On 12/13/2010 7:55 AM, steve mtangoo wrote: > > Yes, ID is autoincrement and hence sequential. > > The problem with using it is, I have to know the ID of the beginning (for > eg > > Book 1 Chapter 1 Verse 2) and

Re: [sqlite] How to write Query to do this?

2010-12-13 Thread steve mtangoo
I used your query and devised this which works: SELECT * FROM Bible WHERE ID BETWEEN (SELECT ID FROM Bible WHERE Book=64 AND Chapter=1 AND Verse=1) AND (SELECT ID FROM Bible WHERE Book=66 AND Chapter=1 AND Verse=3); On Mon, Dec 13, 2010 at 6:25 PM, Puneet Kishor wrote: > > > steve mtangoo wrote

Re: [sqlite] How to write Query to do this?

2010-12-13 Thread Gerry Snyder
On 12/13/2010 7:55 AM, steve mtangoo wrote: > Yes, ID is autoincrement and hence sequential. > The problem with using it is, I have to know the ID of the beginning (for eg > Book 1 Chapter 1 Verse 2) and the Id of the end (eg Book 4 Chapter 10 Verse > 3). Then Simple BETWEEN will resolve it. > > Th

Re: [sqlite] How to write Query to do this?

2010-12-13 Thread Puneet Kishor
steve mtangoo wrote: > No problem. > Now only If I could get the ID of the limits (that is ID for Book 1 Chapter > 1 and Verse 1 for example) and the end limit, my problem will be solved! Well, that is simple... SELECT ID FROM Bible WHERE Book = 1 AND Chapter = 1 AND Verse = 1 same for the end

Re: [sqlite] How to write Query to do this?

2010-12-13 Thread steve mtangoo
No problem. Now only If I could get the ID of the limits (that is ID for Book 1 Chapter 1 and Verse 1 for example) and the end limit, my problem will be solved! Thanks for helping! On Mon, Dec 13, 2010 at 6:13 PM, Puneet Kishor wrote: > > Yes, of course, you are correct. Goes on to show that map

Re: [sqlite] How to write Query to do this?

2010-12-13 Thread Puneet Kishor
steve mtangoo wrote: > select * from Bible where (book> :1 or (book=:1 and (chapter>:1 or > (chapter=:1 and verse>=:1) and (book< :3 or (book=:3 and (chapter<:1 or > (chapter=:1 and verse<=:1); > Does not work. Is there any issue Yes, don't use :1. Just use the number 1. SELECT * FROM Bible W

Re: [sqlite] How to write Query to do this?

2010-12-13 Thread steve mtangoo
select * from Bible where (book > :1 or (book=:1 and (chapter>:1 or (chapter=:1 and verse>=:1) and (book < :3 or (book=:3 and (chapter<:1 or (chapter=:1 and verse<=:1); Does not work. Is there any issue On Mon, Dec 13, 2010 at 6:11 PM, Puneet Kishor wrote: > > > steve mtangoo wrote: > > Hi Igor,

Re: [sqlite] How to write Query to do this?

2010-12-13 Thread Puneet Kishor
Igor Tandetnik wrote: > Puneet Kishor wrote: >> steve mtangoo wrote: >>>I have a script that is supposed to query the Bible scriptures between >>> two >>> intervals. My table is named Bible and have columns: ID (int), Book (int), >>> Chapter(int), Verse (int) and Scripture(text). >>> >>> N

Re: [sqlite] How to write Query to do this?

2010-12-13 Thread Puneet Kishor
steve mtangoo wrote: > Hi Igor, > would you explain what are bookLow and chapterHigh? > Do you mean lowest book and highest chapter? :bookLow and :chapterHigh are place holders for numbers you will provide. Those numbers stand for the lowest numbered book and the highest numbered chapter betwe

Re: [sqlite] How to write Query to do this?

2010-12-13 Thread steve mtangoo
Yes, ID is autoincrement and hence sequential. The problem with using it is, I have to know the ID of the beginning (for eg Book 1 Chapter 1 Verse 2) and the Id of the end (eg Book 4 Chapter 10 Verse 3). Then Simple BETWEEN will resolve it. Thanks for replying! On Mon, Dec 13, 2010 at 5:46 PM, Ge

Re: [sqlite] How to write Query to do this?

2010-12-13 Thread Gerry Snyder
On 12/13/2010 6:54 AM, steve mtangoo wrote: > I have a script that is supposed to query the Bible scriptures between two > intervals. My table is named Bible and have columns: ID (int), Book (int), > Chapter(int), Verse (int) and Scripture(text). Is your ID column a sequential numbering of the

Re: [sqlite] How to write Query to do this?

2010-12-13 Thread steve mtangoo
Hi Igor, would you explain what are bookLow and chapterHigh? Do you mean lowest book and highest chapter? I want to test this query but please help me to understand it. select * from Bible where (book > :bookLow or (book=:bookLow and (chapter>:chapterLow or (chapter=:chapterLow and verse>=:verseLo

Re: [sqlite] How to write Query to do this?

2010-12-13 Thread steve mtangoo
May be I misrepresented myself. I know SQL but this seems to be SQLite3 specific thing. The query below does not work and the reason is Chapters and verses are repetitive. For example Book 1 will have chapters 1, 2, 3, 4, 5 and then Book 2 will have 1, 2, 3, 4, 5 , 6, 7 and then Book 3 will have 1,

Re: [sqlite] How to write Query to do this?

2010-12-13 Thread Simon Slavin
On 13 Dec 2010, at 1:54pm, steve mtangoo wrote: > I have a script that is supposed to query the Bible scriptures between two > intervals. My table is named Bible and have columns: ID (int), Book (int), > Chapter(int), Verse (int) and Scripture(text). > > Now the books are unique i.e. 1-66 but c

Re: [sqlite] How to write Query to do this?

2010-12-13 Thread Igor Tandetnik
steve mtangoo wrote: > I have a script that is supposed to query the Bible scriptures between two > intervals. My table is named Bible and have columns: ID (int), Book (int), > Chapter(int), Verse (int) and Scripture(text). > > Now the books are unique i.e. 1-66 but chapters keep repeating, and

Re: [sqlite] How to write Query to do this?

2010-12-13 Thread Igor Tandetnik
Puneet Kishor wrote: > steve mtangoo wrote: >> I have a script that is supposed to query the Bible scriptures between two >> intervals. My table is named Bible and have columns: ID (int), Book (int), >> Chapter(int), Verse (int) and Scripture(text). >> >> Now the books are unique i.e. 1-66 but

Re: [sqlite] How to write Query to do this?

2010-12-13 Thread Puneet Kishor
steve mtangoo wrote: > I have a script that is supposed to query the Bible scriptures between two > intervals. My table is named Bible and have columns: ID (int), Book (int), > Chapter(int), Verse (int) and Scripture(text). > > Now the books are unique i.e. 1-66 but chapters keep repeating, an

[sqlite] How to write Query to do this?

2010-12-13 Thread steve mtangoo
I have a script that is supposed to query the Bible scriptures between two intervals. My table is named Bible and have columns: ID (int), Book (int), Chapter(int), Verse (int) and Scripture(text). Now the books are unique i.e. 1-66 but chapters keep repeating, and so do verses. Now suppose I wan

[sqlite] How to disable locking method on Sqlite (window)

2010-12-13 Thread Marco Turco
Hi all, I always have problem with locking using MacOSX and Wine on a shared network drive. I checked that Sqlite permit to disable the locking setting SQLITE_ENABLE_LOCKING_STATE=2 but this is only supported on Unix system as I can see on the sqlite3.c source and this is not usable in a MacOS

Re: [sqlite] Urgent Help

2010-12-13 Thread Simon Slavin
On 13 Dec 2010, at 11:49am, Farooq Ahmed wrote: > Is there any provision to insert a new row between two existing rows > of a rangebar chart? If so,please suggest me.Example:Adding a new row > at the position where xaxis label equals 2 so that we will get a new row > with the axis label as 3(nor

[sqlite] Urgent Help

2010-12-13 Thread Farooq Ahmed
Hi.. Is there any provision to insert a new row between two existing rows of a rangebar chart? If so,please suggest me.Example:Adding a new row at the position where xaxis label equals 2 so that we will get a new row with the axis label as 3(normally in range bar chart type,xaxis representatio

Re: [sqlite] new user

2010-12-13 Thread Pavel Ivanov
> I couldn't understand, development environment is 32-bit version. However, > production environment is 64-bit version. Do you by any chance try to use the same sqlite3 library from both environments? 64-bit applications cannot load 32-bit dlls into them. So you need to compile a 64-bit version o

Re: [sqlite] WAL index in memory - multiple connections

2010-12-13 Thread Yoni Londner
Hi, As I said, I think that SQLite should perform at the best, for each system architecture (single process single thread, single process multithread, multi process single thread and multi process multithread). I don't think that one architecture limitations should affect the others. So, I did o