[sqlite] Error in type-def syntax diagram notation??

2009-10-01 Thread Keith Roberts
I'm trying to learn the syntax for SQLite, and I'm getting 
stuck with the type-def production in:

http://www.sqlite.org/lang_createtable.html

I read it as a type-def production is a sequence of one or 
more instances of a terminal symbol - called name, 
optionally followed by a non-terminal signed number in 
parantheses, which may optionally be followed by a comma and 
another signed number within those parantheses.

Should name not be a selection of available type names, 
instead of an iteration?

Can a type-name be followed by a signed number?

Kind Regards,

Keith Roberts

-
Websites:
http://www.php-debuggers.net
http://www.karsites.net
http://www.raised-from-the-dead.org.uk

All email addresses are challenge-response protected with
TMDA [http://tmda.net]
-
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] You can't

2009-10-01 Thread CityDev

SQLite is a relational database. Relations are unordered sets so SQL, which
SQLIte uses, doesn't have any operators to move backwards and forwards.

With a relational database you should number your records in some way and
then your application asks for the appropriate records by number, so if
you're looking at Question 23 and you want to page backwards, your
application must ask SQLite for Question 22.
-- 
View this message in context: 
http://www.nabble.com/how-to-move-backward-and-forward-in-sqlite--tp25702963p25710367.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] Using SQLite for GIS Application

2009-10-01 Thread stormtrooper

This is just a simple spatial intersection. Each line will intersect many
contour lines producing points, you can calculate the average elevation
points per line, calc min, max elev. Or save the line ID and elevation
points in another table to query later. Ask the Spatialite User Group. 

http://groups.google.com/group/spatialite-users



Itzchak Raiskin wrote:
> 
> Hi
> I want to use SQLite in a GIS application where I create a database
> containing terrain data (coordinates, height).
> I would like to query this database with start and end points of a line
> and
> get a vector with all heights point along this line.
> I can, of course create a query for each point along the line, but this
> will
> be very time consuming as I have hundreds of lines with hundreds of
> points.
> Any suggestions?
> 
> Thanks, Itzik
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Using-SQLite-for-GIS-Application-tp25100408p25710287.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] Does SQLite have an Instr function?

2009-10-01 Thread stormtrooper

This extension (extension-functions.c) has Charindex, which is basically the
same as the VB instr.

http://www.sqlite.org/contrib

I had to compile the C source code to make the sqlite extension:
I assume you are on Windows because you use VB.
I had to install the mingw compiler, small and easy to do.
copy sqlite3.h to the same folder
gcc -fPIC -lm -shared extension-functions.c -o libsqlitefunctions.dll
fireup sqlite
select load_extension('libsqlitefunctions.dll') 

there are other string and math functions as well.
good to go!

Keith


RB Smissaert wrote:
> 
> Does SQLite have a string function that produces the first position of a
> string within another string?
> For example select Instr('abcd', 'c') would produce 3
> Looked in the documentation and the forum, but couldn't see it.
> 
> RBS
> 
> 
> 
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Does-SQLite-have-an-Instr-function--tp25408688p25710160.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] Multiline SQL command via C or Objective-C

2009-10-01 Thread Igor Tandetnik
BareFeet wrote:
> The one hurdle I've struck is how to send a multi-statement SQL
> command. Say for instance I want to process a bunch of text such as:
>
> How do I submit it via C functions?

You run the statements one at a time. sqlite3_prepare et al helpfully 
provide a pointer to the first character past the first complete 
statement.

> It seems that I need to use sqlite3_get_table() to get the result in
> one hit, rather than sqlite3_prepare_v2 and stepping through each row.
> Is that right?

What's wrong with stepping through each row?

Igor Tandetnik 



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


Re: [sqlite] Fwd: sqlite3_prepare_v2

2009-10-01 Thread Doug
Try renaming the windows\system32\sqlite3.dll to sqlite3.lld (or anything
else so you can easily find it and restore).

Then see which app has problems launching (if any).  Sqlite3.dll probably
shouldn't be there anyway.

Once you know what app needs that DLL, you can copy it into the
application's directory (and rename back to .dll too).  Or, just rename the
original back to .dll to be back to where you're at today.



> -Original Message-
> From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-
> boun...@sqlite.org] On Behalf Of D. Richard Hipp
> Sent: Thursday, October 01, 2009 12:12 PM
> To: General Discussion of SQLite Database
> Subject: [sqlite] Fwd: sqlite3_prepare_v2
> 
> Any windows users have ideas on how to help MCB?
> 
> Begin forwarded message:
> 
> > From: "M.C.B." 
> > Date: September 30, 2009 9:00:16 PM EDT
> > To: 
> > Subject: sqlite3_prepare_v2
> >
> > Gentlemen:
> >
> > About a week ago, when starting my PC appears a warning window
> > stating:
> >
> > Entry or entrance point of procedure sqlite3_prepare_v2 is not found
> > within the dynamic links' library SQLite3.dll.
> >
> > I've been trying to locate this element without success, as no
> > further information I get on what program this is missing.
> >
> > I started a search in the PC unsuccessfully and in the rescue
> > deleted files as well. Then I look for the SQLite3.dll. and found
> > three places: Windows\System32, Apple\Apple Applications Suport and
> > Apple\Mobile Device Support\bin, where I didn't find the referred
> > element for obvious reazons, Then I went to the Apple web site and
> > found no way to have the missing element.
> >
> > So, I search more in the Internet and found your web site. There, I
> > found no way to identify, which is this missing object and this is
> > why I'm asking for your advice for what to do in order to recover
> > the missing element.
> >
> > Can you please tell what to do in this respect?
> >
> > Thank you in advance for an early reply.
> >
> > M. Cordova B.
> >
> > P.S. For your information I have a Shuffle Ipod, which needs the
> > ITunes to work. And as this belongs to Apple, I think this might be
> > the affected program, not withstanding it works. Besides I have a
> > Nokia Cell, which I don't know if for connecting it to the CP might
> > need the missing element.
> 
> D. Richard Hipp
> d...@hwaci.com
> 
> 
> 
> ___
> 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] Documentation for bubble-generator.tcl

2009-10-01 Thread Keith Roberts
On Thu, 1 Oct 2009, D. Richard Hipp wrote:

> To: General Discussion of SQLite Database 
> From: D. Richard Hipp 
> Subject: Re: [sqlite] Documentation for bubble-generator.tcl
> 
>
> On Oct 1, 2009, at 2:28 PM, Keith Roberts wrote:
>>
>> I have downloaded and run bubble-generator.tcl.
>>
>> It works OK. I'm not a TCL/TK person, and would like to
>> modify the bubble-generator.tcl code.
>>
>> Is there any documentation on how the script works please?
>
> The only documentation is comments in the code.
>
> D. Richard Hipp
> d...@hwaci.com

OK. Thanks for pointing that out Richard,

Kind Regards,

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


Re: [sqlite] Documentation for bubble-generator.tcl

2009-10-01 Thread D. Richard Hipp

On Oct 1, 2009, at 2:28 PM, Keith Roberts wrote:
>
> I have downloaded and run bubble-generator.tcl.
>
> It works OK. I'm not a TCL/TK person, and would like to
> modify the bubble-generator.tcl code.
>
> Is there any documentation on how the script works please?

The only documentation is comments in the code.

D. Richard Hipp
d...@hwaci.com



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


[sqlite] Documentation for bubble-generator.tcl

2009-10-01 Thread Keith Roberts
Hi everyone.

I have downloaded and run bubble-generator.tcl.

It works OK. I'm not a TCL/TK person, and would like to 
modify the bubble-generator.tcl code.

Is there any documentation on how the script works please?

Kind Regards,

Keith Roberts

-
Websites:
http://www.php-debuggers.net
http://www.karsites.net
http://www.raised-from-the-dead.org.uk

All email addresses are challenge-response protected with
TMDA [http://tmda.net]
-
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] how to move backward and forward in sqlite?

2009-10-01 Thread Kees Nuyt
On 29 Sep 2009 10:11:02 -, "gyanendra singh"
 wrote:

>Hi,
>
>Can you please help me?I am facing one following problem in sqlite.
>
>i want to move forward and backward using sqlite.
>
>for example if i clik on the previous button i could move back 
>question.
>
>and on clicking on next button i could move on the next question.
>
>Pls help me.

It is not commpletely clear what you are up to. I guess you
want to write a program that "pages" through a database
table.

Have a look at:
http://www.sqlite.org/cvstrac/wiki?p=ScrollingCursor
-- 
  (  Kees Nuyt
  )
c[_]
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQLite behaviour on FreeBSD and KVM

2009-10-01 Thread Matthew Tippett
Yes.  It was sent from an unsubscribed address, queued in the
moderator who looks like they just cleared the queue.

Regards... Matthew


On 10/1/09, Pavel Ivanov  wrote:
>> We solved this yesterday, right ?  Is anyone else seeing this a second
>> time ?
>
> Yes. Though date of the second letter correctly shows that it was sent
> 2 days ago I've received it just minutes ago.
>
> Pavel
>
> On Thu, Oct 1, 2009 at 1:25 PM, Simon Slavin
>  wrote:
>>
>> On 29 Sep 2009, at 8:37pm, Tippett, Matthew wrote:
>>
>>> I would like to highlight the following SQLite benchmark results
>>> posted
>>> by Phoronix via Phoronix Test Suite (http://www.phoronix-test-suite.com/
>>> )
>>
>> We solved this yesterday, right ?  Is anyone else seeing this a second
>> time ?
>>
>> Simon.
>> ___
>> 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
>

-- 
Sent from my mobile device
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQLite behaviour on FreeBSD and KVM

2009-10-01 Thread D. Richard Hipp

On Oct 1, 2009, at 1:35 PM, Pavel Ivanov wrote:

>> We solved this yesterday, right ?  Is anyone else seeing this a  
>> second
>> time ?
>
> Yes. Though date of the second letter correctly shows that it was sent
> 2 days ago I've received it just minutes ago.

When a non-subscriber sends an email to this mailing list, the message  
is queued for approval.  (Otherwise, you would all be seeing about 50  
offers for "list of doctors in your area" and "test and keep DELL  
laptops" per day.)  I check the pending queue about once per day.   
Those messages that appear to be legitimate are approved and then go  
to the list.  But as I only check the queue once per day, there is  
about a one-day delay.  This week, I am at a conference, and so I  
didn't have a chance to check the queue yesterday, hence, there was as  
much as a two-day delay.

Sometimes a user will send the same message two or more times from  
varying email addresses.  One of those addresses will be a subscriber  
address and will appear on the list immediately.  Other messages will  
get queued for approval and will appear on the list after a delay of a  
day or two.  That seems to be what happened here.

If you see a redundant message, simply ignore it.

D. Richard Hipp
d...@hwaci.com



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


Re: [sqlite] SQLite behaviour on FreeBSD and KVM

2009-10-01 Thread Pavel Ivanov
> We solved this yesterday, right ?  Is anyone else seeing this a second
> time ?

Yes. Though date of the second letter correctly shows that it was sent
2 days ago I've received it just minutes ago.

Pavel

On Thu, Oct 1, 2009 at 1:25 PM, Simon Slavin
 wrote:
>
> On 29 Sep 2009, at 8:37pm, Tippett, Matthew wrote:
>
>> I would like to highlight the following SQLite benchmark results
>> posted
>> by Phoronix via Phoronix Test Suite (http://www.phoronix-test-suite.com/
>> )
>
> We solved this yesterday, right ?  Is anyone else seeing this a second
> time ?
>
> Simon.
> ___
> 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] SQLite crashes when trying to INSERT into table with wrong default value

2009-10-01 Thread Dan Kennedy

On Sep 30, 2009, at 1:33 PM, ste...@schallerl.com wrote:

> Hi all,
>
> i've got a table:
> CREATE TABLE [usr_user] ([id] INTEGER PRIMARY KEY AUTOINCREMENT,
> [name] TEXT, [email] TEXT, [password] TEXT, [createDate] DATETIME
> DEFAULT (NOW()))

Looks like the same problem as this one:

   http://www.sqlite.org/src/info/2d401a94287

This was fixed for 3.6.18.

Dan.

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


Re: [sqlite] SQLite behaviour on FreeBSD and KVM

2009-10-01 Thread Simon Slavin

On 29 Sep 2009, at 8:37pm, Tippett, Matthew wrote:

> I would like to highlight the following SQLite benchmark results  
> posted
> by Phoronix via Phoronix Test Suite (http://www.phoronix-test-suite.com/ 
> )

We solved this yesterday, right ?  Is anyone else seeing this a second  
time ?

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


Re: [sqlite] saving INT with starting zero

2009-10-01 Thread Simon Slavin

On 30 Sep 2009, at 10:02pm, Tjalve wrote:

> I got a strange problem with SQLite 3.0.
>
> I cannot seem to save integers that starts with zero correctly.
>
> eks. 080168 gets saved as 80168, but if i try only 0, its saved as 0.
> I have tried to make a new table with a only a INT field to test but i
> get the same result.

Define the column as TEXT (which you have probably done).
Put single quotes around the value you're writing: '080168'.
In SQLite all strings must be quoted.

> Using SQLite Admin and SQLite Manager (firefox addon).

Depending on exactly how you're using them, if they don't handle this  
properly it's possible they're buggy.

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


Re: [sqlite] Fwd: sqlite3_prepare_v2

2009-10-01 Thread Mohit Sindhwani
D. Richard Hipp wrote:
> Any windows users have ideas on how to help MCB?
>   

It seems like there's a problem with paths.  It seems that the "wrong" 
DLL is earlier in the path than the one that the application expects.

Any idea which application has the problem?  Is it iTunes?

Cheers
Mohit.


> Begin forwarded message:
>
>   
>> From: "M.C.B." 
>> Date: September 30, 2009 9:00:16 PM EDT
>> To: 
>> Subject: sqlite3_prepare_v2
>>
>> Gentlemen:
>>
>> About a week ago, when starting my PC appears a warning window  
>> stating:
>>
>> Entry or entrance point of procedure sqlite3_prepare_v2 is not found  
>> within the dynamic links' library SQLite3.dll.
>>
>> I've been trying to locate this element without success, as no  
>> further information I get on what program this is missing.
>>
>> I started a search in the PC unsuccessfully and in the rescue  
>> deleted files as well. Then I look for the SQLite3.dll. and found  
>> three places: Windows\System32, Apple\Apple Applications Suport and  
>> Apple\Mobile Device Support\bin, where I didn't find the referred  
>> element for obvious reazons, Then I went to the Apple web site and  
>> found no way to have the missing element.
>>
>> So, I search more in the Internet and found your web site. There, I  
>> found no way to identify, which is this missing object and this is  
>> why I'm asking for your advice for what to do in order to recover  
>> the missing element.
>>
>> Can you please tell what to do in this respect?
>>
>> Thank you in advance for an early reply.
>>
>> M. Cordova B.
>>
>> P.S. For your information I have a Shuffle Ipod, which needs the  
>> ITunes to work. And as this belongs to Apple, I think this might be  
>> the affected program, not withstanding it works. Besides I have a  
>> Nokia Cell, which I don't know if for connecting it to the CP might  
>> need the missing element.
>> 
>
> D. Richard Hipp
> d...@hwaci.com
>
>
>
> ___
> 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] how to move backward and forward in sqlite?

2009-10-01 Thread P Kishor
On Tue, Sep 29, 2009 at 5:11 AM, gyanendra singh  wrote:
> Hi,
>
> Can you please help me?I am facing one following problem in sqlite.
>
> i want to move forward and backward using sqlite.
>
> for example if i clik on the previous button i could move back
> question.
>
> and on clicking on next button i could move on the next question.

What on earth are you talking about? sqlite doesn't have a forward or
a backward button. What exactly are you using that you think is
sqlite?


>
> Pls help me.
>
> Thanks.
>
> Regards,
> Gsy.
>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



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


Re: [sqlite] Database Diff libs or applications

2009-10-01 Thread Douglas E. Fajardo
If your application is creating/deleting tables, then it (the program) can 
insert its own 'I am creating/deleting a table' record into the replay table, 
at the same time it creates the triggers.
*** Doug


-Original Message-
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] 
On Behalf Of Shaun Seckman (Firaxis)
Sent: Thursday, October 01, 2009 8:10 AM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] Database Diff libs or applications

I've been looking into using triggers to create a replay table.  This seems to 
be pretty restrictive in that it requires a trigger to be created for each 
table and cannot track when tables are dropped or created (documentation says 
that triggers will not be applied to tables like sqlite_master) 

Is there a way around this?

-Original Message-
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] 
On Behalf Of Shaun Seckman (Firaxis)
Sent: Thursday, October 01, 2009 10:13 AM
To: punk...@eidesis.org; General Discussion of SQLite Database
Subject: Re: [sqlite] Database Diff libs or applications

Are there any limitations to this?  Will this track any and all SQL actions 
done to the database or just table data changes?  I'll hunt down the post now :)

-Shaun

-Original Message-
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] 
On Behalf Of P Kishor
Sent: Thursday, October 01, 2009 10:03 AM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] Database Diff libs or applications

On Thu, Oct 1, 2009 at 8:44 AM, Shaun Seckman (Firaxis)
 wrote:
> Hello,
>
>                I'm looking to externally track the actions made to a
> database so that I can apply those same actions to another database
> (assuming the other database has a similar schema).   I've searched the
> documentation and there doesn't seem to be an easy way to extract this
> data so my only option seems to be utilizing some sort of library or
> application to diff the two databases and generate a SQL script based on
> the changes.
>
>

Store the "actions made to a database," in other words, the SQL, in a
log and then replay that log against the other database.

You can use TRIGGERs to store the SQL in a replay table. Search the
archives. Dennis Cote has contributed some code for that in one of the
threads.


>
> Has anyone done this before?  Does such a library or application exist?
> I'm sure I could write my own if needed.
>
>
>
> -Shaun
>
>
>
>
>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
Puneet Kishor http://www.punkish.org
Carbon Model http://carbonmodel.org
Charter Member, Open Source Geospatial Foundation http://www.osgeo.org
Science Commons Fellow, http://sciencecommons.org/about/whoweare/kishor
Nelson Institute, UW-Madison http://www.nelson.wisc.edu
---
Assertions are politics; backing up assertions with evidence is science
===
Sent from Madison, WI, United States
___
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

__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Fwd: sqlite3_prepare_v2

2009-10-01 Thread D. Richard Hipp
Any windows users have ideas on how to help MCB?

Begin forwarded message:

> From: "M.C.B." 
> Date: September 30, 2009 9:00:16 PM EDT
> To: 
> Subject: sqlite3_prepare_v2
>
> Gentlemen:
>
> About a week ago, when starting my PC appears a warning window  
> stating:
>
> Entry or entrance point of procedure sqlite3_prepare_v2 is not found  
> within the dynamic links' library SQLite3.dll.
>
> I've been trying to locate this element without success, as no  
> further information I get on what program this is missing.
>
> I started a search in the PC unsuccessfully and in the rescue  
> deleted files as well. Then I look for the SQLite3.dll. and found  
> three places: Windows\System32, Apple\Apple Applications Suport and  
> Apple\Mobile Device Support\bin, where I didn't find the referred  
> element for obvious reazons, Then I went to the Apple web site and  
> found no way to have the missing element.
>
> So, I search more in the Internet and found your web site. There, I  
> found no way to identify, which is this missing object and this is  
> why I'm asking for your advice for what to do in order to recover  
> the missing element.
>
> Can you please tell what to do in this respect?
>
> Thank you in advance for an early reply.
>
> M. Cordova B.
>
> P.S. For your information I have a Shuffle Ipod, which needs the  
> ITunes to work. And as this belongs to Apple, I think this might be  
> the affected program, not withstanding it works. Besides I have a  
> Nokia Cell, which I don't know if for connecting it to the CP might  
> need the missing element.

D. Richard Hipp
d...@hwaci.com



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


[sqlite] saving INT with starting zero

2009-10-01 Thread Tjalve
I got a strange problem with SQLite 3.0.

I cannot seem to save integers that starts with zero correctly.

eks. 080168 gets saved as 80168, but if i try only 0, its saved as 0.
I have tried to make a new table with a only a INT field to test but i
get the same result.

Using SQLite Admin and SQLite Manager (firefox addon).
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Enhanchemt request and patch: make sqlite3 behave with sqlite2 db-files

2009-10-01 Thread Juergen Weigert
At SUSE, we have /usr/bin/sqlite in default install, which happens to be
sqlite 2-8.17./usr/bin/sqlite3 only comes from an optional add on package 
sqlite3. 
Upgrading /usr/bin/sqlite is not possible as we might break old applications 
expecting sqlite2 there.
This fools users into creating oldstyle sqlite2 databases unintentionally,
or into believing we haven't updated our packages in years.

The appended patch fixes the situation. 
It allows installing /usr/bin/sqlite3 with a symlink to sqlite,
and also having /usr/bin/sqlite2 around for compatibility.

cheers,
JW-

-- 
 o \  Juergen Weigert  paint it green!__/ _===.===_
 | j...@suse.de   back to ascii!  __/_---|\/
 \  | 0911 74053-508__/  (//\
(/) | _/  _/ \_ vim:set sw=2 wm=8
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg)
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] SQLite crashes when trying to INSERT into table with wrong default value

2009-10-01 Thread stefan
Hi all,

i've got a table:
CREATE TABLE [usr_user] ([id] INTEGER PRIMARY KEY AUTOINCREMENT,  
[name] TEXT, [email] TEXT, [password] TEXT, [createDate] DATETIME  
DEFAULT (NOW()))

see the problem? i figured out myself that "NOW()" as a default value  
doesn't work (i'm new with sqlite, coming from mysql - so it didn't  
occur to me right away).

now, when i tried to insert a row into this table:
INSERT INTO usr_user ('asdf', 'a...@asdf.com', 'somemd5hash')

it crashed sqliteman, sqlitestudio and apache with php5/pdo. in php i  
was able to step through the code, crashing occured when preparing  
that statement.

for reference, the error reported in apaches error log file is:
[Wed Sep 30 08:24:51 2009] [notice] Parent: child process exited with  
status 3221225477 -- Restarting.
i remember the status code to be a different one when trying it from home.

i've tried to replicate it on 3 different systems, all with the same result:
* winXP 32b
* win7 64b
* Linux 2.6.27.7-grsec #25 SMP Mon Feb 16 16:37:38 CET 2009 i686

sqlite info:
PECL Module version: (bundled) 1.0.1 $Id: pdo_sqlite.c,v 1.10.2.6.2.4  
2008/12/31 11:17:42 sebastian Exp $
SQLite Library:  3.3.7

now, this error is easily fixed by just removing/replacing the  
offending default value, but shouldn't it be handelt differently than  
just crashing?

thanks, stefan


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


[sqlite] SQLite behaviour on FreeBSD and KVM

2009-10-01 Thread Tippett, Matthew
Hi,

I would like to highlight the following SQLite benchmark results posted 
by Phoronix via Phoronix Test Suite (http://www.phoronix-test-suite.com/)

In particular

 http://www.phoronix.com/scan.php?page=article=linux_2631_kvm=3
 
http://www.phoronix.com/scan.php?page=article=freebsd8_ubuntu910=7

In both of these cases, there are configurations where there is an order 
of magnitude difference between the performance of the systems. 

I would like to confirm my expectation that SQLite will by default 
always do synchronous file operations.  It seems that in the Ubuntu 
guest on KVM Ubuntu host and the FreeBSD-8.0-RC1 benchmarks, it would 
appears that the kernel and filesystem are not honoring the request for 
synchronous fileIO.

Is my assertion sane? 

Regards,

Matthew

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


[sqlite] how to move backward and forward in sqlite?

2009-10-01 Thread gyanendra singh
Hi,

Can you please help me?I am facing one following problem in sqlite.

i want to move forward and backward using sqlite.

for example if i clik on the previous button i could move back 
question.

and on clicking on next button i could move on the next question.

Pls help me.

Thanks.

Regards,
Gsy.

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


Re: [sqlite] Access Violation in sqlite3.dll

2009-10-01 Thread meng wei
Thanks!

>This line shouldn't compile unless you really meant
>::sqlCallback_UpdateList as the 3rd parameter.

I reallly meant it as the 3rd parameter.
I have made my program run but don't why,as I've wrote in the reply to 
Pavel.

>Do you understand that this output is useless? What would be useful is
>a stack trace for the error.
My teacher haven't taught me of this.Could you tell me how to make use of the 
stack trace?
what's more,the problem happens when the program run into the dll,how to debug?


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


Re: [sqlite] Access violation in sqlite3.dll

2009-10-01 Thread meng wei
THANKS VERY MUCH for so exhaustive reply! :-)

I made my program run before I saw your reply, but I can't understand
how it works.

The problem seems to be caused by the 1st parameter of sqlite3_exec.
sqlite3_exec(pDoc->m_db,pDoc->m_strSQL,sqlCallback_UpdateList , 0,
&(pDoc->m_pErrMsg));
I changed "pDoc->m_db" and it works.Just like this:

void CMainView::myUpdateView()
{
CSenateSystemDoc* pDoc = GetDocument();
sqlite3_open("SenateSystem", );

sqlite3_exec(db,pDoc->m_strSQL,sqlCallback_UpdateList , 0,
&(pDoc->m_pErrMsg));
//formerly "sqlite3_exec(pDoc->*m_db*,"select * from table1",
sqlCallback_UpdateList, 0, &(pDoc->*m_pErrMsg*));"
sqlite3_close(db);
db = 0;
}

I haven't made any changes to callback function ,but it works. Why?

And why using a "sqlite3*" declared in another class(here pDoc->*m_db*)
will fail?
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Database Diff libs or applications

2009-10-01 Thread Pavel Ivanov
> Is there a way around this?

No, there's no way around this. If you want to freely create and drop
tables and then propagate these changes to other database then I think
the easiest way to do it for you is dump the whole database and then
create second database from scratch. Or you can write some analyzer of
dump's output that will find what was changed when compared to the
previous dump.

Pavel

On Thu, Oct 1, 2009 at 11:10 AM, Shaun Seckman (Firaxis)
 wrote:
> I've been looking into using triggers to create a replay table.  This seems 
> to be pretty restrictive in that it requires a trigger to be created for each 
> table and cannot track when tables are dropped or created (documentation says 
> that triggers will not be applied to tables like sqlite_master)
>
> Is there a way around this?
>
> -Original Message-
> From: sqlite-users-boun...@sqlite.org 
> [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Shaun Seckman (Firaxis)
> Sent: Thursday, October 01, 2009 10:13 AM
> To: punk...@eidesis.org; General Discussion of SQLite Database
> Subject: Re: [sqlite] Database Diff libs or applications
>
> Are there any limitations to this?  Will this track any and all SQL actions 
> done to the database or just table data changes?  I'll hunt down the post now 
> :)
>
> -Shaun
>
> -Original Message-
> From: sqlite-users-boun...@sqlite.org 
> [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of P Kishor
> Sent: Thursday, October 01, 2009 10:03 AM
> To: General Discussion of SQLite Database
> Subject: Re: [sqlite] Database Diff libs or applications
>
> On Thu, Oct 1, 2009 at 8:44 AM, Shaun Seckman (Firaxis)
>  wrote:
>> Hello,
>>
>>                I'm looking to externally track the actions made to a
>> database so that I can apply those same actions to another database
>> (assuming the other database has a similar schema).   I've searched the
>> documentation and there doesn't seem to be an easy way to extract this
>> data so my only option seems to be utilizing some sort of library or
>> application to diff the two databases and generate a SQL script based on
>> the changes.
>>
>>
>
> Store the "actions made to a database," in other words, the SQL, in a
> log and then replay that log against the other database.
>
> You can use TRIGGERs to store the SQL in a replay table. Search the
> archives. Dennis Cote has contributed some code for that in one of the
> threads.
>
>
>>
>> Has anyone done this before?  Does such a library or application exist?
>> I'm sure I could write my own if needed.
>>
>>
>>
>> -Shaun
>>
>>
>>
>>
>>
>> ___
>> sqlite-users mailing list
>> sqlite-users@sqlite.org
>> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>>
>
>
>
> --
> Puneet Kishor http://www.punkish.org
> Carbon Model http://carbonmodel.org
> Charter Member, Open Source Geospatial Foundation http://www.osgeo.org
> Science Commons Fellow, http://sciencecommons.org/about/whoweare/kishor
> Nelson Institute, UW-Madison http://www.nelson.wisc.edu
> ---
> Assertions are politics; backing up assertions with evidence is science
> ===
> Sent from Madison, WI, United States
> ___
> 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-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Database Diff libs or applications

2009-10-01 Thread Shaun Seckman (Firaxis)
I've been looking into using triggers to create a replay table.  This seems to 
be pretty restrictive in that it requires a trigger to be created for each 
table and cannot track when tables are dropped or created (documentation says 
that triggers will not be applied to tables like sqlite_master) 

Is there a way around this?

-Original Message-
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] 
On Behalf Of Shaun Seckman (Firaxis)
Sent: Thursday, October 01, 2009 10:13 AM
To: punk...@eidesis.org; General Discussion of SQLite Database
Subject: Re: [sqlite] Database Diff libs or applications

Are there any limitations to this?  Will this track any and all SQL actions 
done to the database or just table data changes?  I'll hunt down the post now :)

-Shaun

-Original Message-
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] 
On Behalf Of P Kishor
Sent: Thursday, October 01, 2009 10:03 AM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] Database Diff libs or applications

On Thu, Oct 1, 2009 at 8:44 AM, Shaun Seckman (Firaxis)
 wrote:
> Hello,
>
>                I'm looking to externally track the actions made to a
> database so that I can apply those same actions to another database
> (assuming the other database has a similar schema).   I've searched the
> documentation and there doesn't seem to be an easy way to extract this
> data so my only option seems to be utilizing some sort of library or
> application to diff the two databases and generate a SQL script based on
> the changes.
>
>

Store the "actions made to a database," in other words, the SQL, in a
log and then replay that log against the other database.

You can use TRIGGERs to store the SQL in a replay table. Search the
archives. Dennis Cote has contributed some code for that in one of the
threads.


>
> Has anyone done this before?  Does such a library or application exist?
> I'm sure I could write my own if needed.
>
>
>
> -Shaun
>
>
>
>
>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
Puneet Kishor http://www.punkish.org
Carbon Model http://carbonmodel.org
Charter Member, Open Source Geospatial Foundation http://www.osgeo.org
Science Commons Fellow, http://sciencecommons.org/about/whoweare/kishor
Nelson Institute, UW-Madison http://www.nelson.wisc.edu
---
Assertions are politics; backing up assertions with evidence is science
===
Sent from Madison, WI, United States
___
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] Database Diff libs or applications

2009-10-01 Thread Shaun Seckman (Firaxis)
Are there any limitations to this?  Will this track any and all SQL actions 
done to the database or just table data changes?  I'll hunt down the post now :)

-Shaun

-Original Message-
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] 
On Behalf Of P Kishor
Sent: Thursday, October 01, 2009 10:03 AM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] Database Diff libs or applications

On Thu, Oct 1, 2009 at 8:44 AM, Shaun Seckman (Firaxis)
 wrote:
> Hello,
>
>                I'm looking to externally track the actions made to a
> database so that I can apply those same actions to another database
> (assuming the other database has a similar schema).   I've searched the
> documentation and there doesn't seem to be an easy way to extract this
> data so my only option seems to be utilizing some sort of library or
> application to diff the two databases and generate a SQL script based on
> the changes.
>
>

Store the "actions made to a database," in other words, the SQL, in a
log and then replay that log against the other database.

You can use TRIGGERs to store the SQL in a replay table. Search the
archives. Dennis Cote has contributed some code for that in one of the
threads.


>
> Has anyone done this before?  Does such a library or application exist?
> I'm sure I could write my own if needed.
>
>
>
> -Shaun
>
>
>
>
>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
Puneet Kishor http://www.punkish.org
Carbon Model http://carbonmodel.org
Charter Member, Open Source Geospatial Foundation http://www.osgeo.org
Science Commons Fellow, http://sciencecommons.org/about/whoweare/kishor
Nelson Institute, UW-Madison http://www.nelson.wisc.edu
---
Assertions are politics; backing up assertions with evidence is science
===
Sent from Madison, WI, United States
___
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] Database Diff libs or applications

2009-10-01 Thread Shaun Seckman (Firaxis)
It's mostly context A but sometimes context B :)
Here's a better description of what will happen..

I start out with database A.  This database is mostly constant.  

User Bob opens database A in a custom editor and performs changes and
tweaks to the database.  Bob then saves out his changes either in the
form of some separate transaction file.

User Joe opens database A in the same editor and performs different
changes to the database and saves them out to a separate file as well.

The third user Adam then loads up database A in another application,
applies the changes from Bob, applies the changes from Joe, and then
performs read-only operations from that point on.

When a user has the database open in the editor to make changes,
Database A can be considered constant and read-only.  I needn't worry
about maintaining a constant connection as the file will only ever be
updated outside the use of that editor.

The final order in which to apply changes needs to be flexible and at
the user's discretion (this will result in a different final output but
that is expected).

I'm assuming I'll need a custom editor in order to load/save incremental
changes as opposed to the final database.



-Original Message-
From: sqlite-users-boun...@sqlite.org
[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Adam DeVita
Sent: Thursday, October 01, 2009 9:49 AM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] Database Diff libs or applications

There has been a lot of discussion of this and several of us are doing
it.

Are you talking about

A)
DB1 which has modify data
and
DB2 which only receives modifications from DB1 only,

or
B)
DB1 and DB2 both get updates independently and need to be synchronized?

or
C)
  something else Not (A or B)

Your context implies what automated or custom solution you would use.

On Thu, Oct 1, 2009 at 9:44 AM, Shaun Seckman (Firaxis) <
shaun.seck...@firaxis.com> wrote:

> Hello,
>
>I'm looking to externally track the actions made to a
> database so that I can apply those same actions to another database
> (assuming the other database has a similar schema).   I've searched
the
> documentation and there doesn't seem to be an easy way to extract this
> data so my only option seems to be utilizing some sort of library or
> application to diff the two databases and generate a SQL script based
on
> the changes.
>
>
>
> Has anyone done this before?  Does such a library or application
exist?
> I'm sure I could write my own if needed.
>
>
>
> -Shaun
>
>
>
>
>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
VerifEye Technologies Inc.
905-948-0015x245
7100 Warden Ave, Unit 3
Markham ON, L3R 8B5
Canada
___
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] Database Diff libs or applications

2009-10-01 Thread P Kishor
On Thu, Oct 1, 2009 at 8:44 AM, Shaun Seckman (Firaxis)
 wrote:
> Hello,
>
>                I'm looking to externally track the actions made to a
> database so that I can apply those same actions to another database
> (assuming the other database has a similar schema).   I've searched the
> documentation and there doesn't seem to be an easy way to extract this
> data so my only option seems to be utilizing some sort of library or
> application to diff the two databases and generate a SQL script based on
> the changes.
>
>

Store the "actions made to a database," in other words, the SQL, in a
log and then replay that log against the other database.

You can use TRIGGERs to store the SQL in a replay table. Search the
archives. Dennis Cote has contributed some code for that in one of the
threads.


>
> Has anyone done this before?  Does such a library or application exist?
> I'm sure I could write my own if needed.
>
>
>
> -Shaun
>
>
>
>
>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
Puneet Kishor http://www.punkish.org
Carbon Model http://carbonmodel.org
Charter Member, Open Source Geospatial Foundation http://www.osgeo.org
Science Commons Fellow, http://sciencecommons.org/about/whoweare/kishor
Nelson Institute, UW-Madison http://www.nelson.wisc.edu
---
Assertions are politics; backing up assertions with evidence is science
===
Sent from Madison, WI, United States
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Database Diff libs or applications

2009-10-01 Thread Adam DeVita
There has been a lot of discussion of this and several of us are doing it.

Are you talking about

A)
DB1 which has modify data
and
DB2 which only receives modifications from DB1 only,

or
B)
DB1 and DB2 both get updates independently and need to be synchronized?

or
C)
  something else Not (A or B)

Your context implies what automated or custom solution you would use.

On Thu, Oct 1, 2009 at 9:44 AM, Shaun Seckman (Firaxis) <
shaun.seck...@firaxis.com> wrote:

> Hello,
>
>I'm looking to externally track the actions made to a
> database so that I can apply those same actions to another database
> (assuming the other database has a similar schema).   I've searched the
> documentation and there doesn't seem to be an easy way to extract this
> data so my only option seems to be utilizing some sort of library or
> application to diff the two databases and generate a SQL script based on
> the changes.
>
>
>
> Has anyone done this before?  Does such a library or application exist?
> I'm sure I could write my own if needed.
>
>
>
> -Shaun
>
>
>
>
>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
VerifEye Technologies Inc.
905-948-0015x245
7100 Warden Ave, Unit 3
Markham ON, L3R 8B5
Canada
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Database Diff libs or applications

2009-10-01 Thread Shaun Seckman (Firaxis)
Hello,

I'm looking to externally track the actions made to a
database so that I can apply those same actions to another database
(assuming the other database has a similar schema).   I've searched the
documentation and there doesn't seem to be an easy way to extract this
data so my only option seems to be utilizing some sort of library or
application to diff the two databases and generate a SQL script based on
the changes.  

 

Has anyone done this before?  Does such a library or application exist?
I'm sure I could write my own if needed.

 

-Shaun

 

 

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


Re: [sqlite] feature request - field exclusion list in select list

2009-10-01 Thread CityDev

This is altogether bad practice.

You should always define what fields you want. Using Select * is just asking
for trouble. To limit the number of fields that are accessible to a
process/user/program, you should use a view. With a view you can of course
then use Select * but that's not the point.

Each program should have a defined external view/schema. This decouples
programs from the underlying data model (within the limitations of the
database view facilities - which are not that brilliant in SQLite).   
-- 
View this message in context: 
http://www.nabble.com/feature-request---field-exclusion-list-in-select-list-tp25639074p25696861.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] Where to create index, a doubt ...

2009-10-01 Thread Simon Slavin

On 1 Oct 2009, at 8:18am, Simon Slavin wrote:

> If you make very few changes and do a lot
> of SELECTing you might want one index that's ideal for every SELECT.

Unclear.  I meant

> If you make very few changes and do a lot
> of SELECTing you might want lots of indexes: one that's ideal for  
> every SELECT and UPDATE.

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


Re: [sqlite] Where to create index, a doubt ...

2009-10-01 Thread Simon Slavin

On 1 Oct 2009, at 8:01am, Atul_Vaidya wrote:

>   I was told that indexing greatly enhance the speed of SQlite,  
> however, i
> was cautioned that it comes in as an overhead, in terms of increased  
> size of
> the database.The Database, that I am handling, isn't larger.

The database will always be larger each time you add an index.  But  
the index is what allows SQL to find just the records you want rather  
that having to search through every record.  Without indexes you may  
as well not be using SQL.

> Also, I was told, that one should watch, where to create the indexes.
>   I have created index after creating the table in the  
> database.Should I
> create the index, at the end, when all the data gets itself into the
> database ?

If you are importing a lot of data to set up your database the first  
time, it's faster to import all the data first, then create the  
indexes you need.  But if the indexes already exist, it is usually not  
worth doing 'delete indexes, add more data, make new indexes'.  Just  
remember to make all your changes as one transaction.

> Also it would be nice to know,if the inserts are slower when we are  
> adding
> data to the table with indexes already applied to it ?

Yes they are.  Because SQL has to add the new record to the table and  
also make another record in each index for the table.  But only a very  
tiny bit slower.  It's not normally worth worrying about.

> General guidelines about indexing will be greatly appreciated

It's all about the balance.  If you make very few changes and do a lot  
of SELECTing you might want one index that's ideal for every SELECT.   
If you make a great deal of changes to your data but do a SELECT only  
rarely you want to keep your indexes to a minimum.  As you use SQL  
more you will become better at guessing what is faster, but until then  
do some testing.

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


[sqlite] Where to create index, a doubt ...

2009-10-01 Thread Atul_Vaidya

Hi list,
   I was told that indexing greatly enhance the speed of SQlite, however, i
was cautioned that it comes in as an overhead, in terms of increased size of
the database.The Database, that I am handling, isn't larger.
Also, I was told, that one should watch, where to create the indexes.
   I have created index after creating the table in the database.Should I
create the index, at the end, when all the data gets itself into the
database ? 
Also it would be nice to know,if the inserts are slower when we are adding
data to the table with indexes already applied to it ?
General guidelines about indexing will be greatly appreciated.
Thanks in advance,
Atul


-- 
View this message in context: 
http://www.nabble.com/Where-to-create-index%2C-a-doubt-...-tp25693438p25693438.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