Re: [sqlite] DEFAULT values replace explicit NULLs?

2006-03-03 Thread Firman Wandayandi
On 3/4/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Is the DEFAULT value for a column suppose to replace > an explicit NULL value? Or does the DEFAULT value only > get used if no values for an insert is specified? What > is the correct SQL behavior? > > SQLite does the latter - the DEFAULT

Re: [sqlite] DEFAULT values replace explicit NULLs?

2006-03-03 Thread Thomas Chust
On Fri, 3 Mar 2006, [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] writes: Is the DEFAULT value for a column suppose to replace an explicit NULL value? Or does the DEFAULT value only get used if no values for an insert is specified? What is the correct SQL behavior? SQLite does the latter - the

Re: [sqlite] DEFAULT values replace explicit NULLs?

2006-03-03 Thread Brad
Is the DEFAULT value for a column suppose to replace an explicit NULL value? Or does the DEFAULT value only get used if no values for an insert is specified? What is the correct SQL behavior? SQLite does the latter - the DEFAULT value is only used if no value is given for the column. If you

Re: [sqlite] DEFAULT values replace explicit NULLs?

2006-03-03 Thread Jay Sprenkle
> I don't know which is "right" but I certainly have a strong preference. If I > explicitly insert a value into a column, it's because I want *that* value > inserted -- even if the value I insert is NULL. If I don't insert any value, > then I expect the DEFAULT value, if one is specified for the

Re: [sqlite] DEFAULT values replace explicit NULLs?

2006-03-03 Thread Jay Sprenkle
Default is only supposed to apply on insert, and if no value is specified. If you explicitly insert a null it should be null, not the default. On 3/3/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Is the DEFAULT value for a column suppose to replace > an explicit NULL value? Or does the DEFA

Re: [sqlite] DEFAULT values replace explicit NULLs?

2006-03-03 Thread Derrell . Lipman
[EMAIL PROTECTED] writes: > Is the DEFAULT value for a column suppose to replace > an explicit NULL value? Or does the DEFAULT value only > get used if no values for an insert is specified? What > is the correct SQL behavior? > > SQLite does the latter - the DEFAULT value is only used > if no va

[sqlite] DEFAULT values replace explicit NULLs?

2006-03-03 Thread drh
Is the DEFAULT value for a column suppose to replace an explicit NULL value? Or does the DEFAULT value only get used if no values for an insert is specified? What is the correct SQL behavior? SQLite does the latter - the DEFAULT value is only used if no value is given for the column. If you ins

Re: [sqlite] Using SQLite on networked drive

2006-03-03 Thread Vishal Kashyap
Deepak , I simply got it done by maping the shared folder to a drive letter and made the connection persistant. Moreover changed all the inherent script was also changed in php cli program and every this is rocking Best Regards, Vishal Kashyap. http://vishal.net.in On 3/3/06, Deepak Kaul <[EMAI

Re: [sqlite] Expressions

2006-03-03 Thread Christian Smith
On Fri, 3 Mar 2006, Roger wrote: >How do i use expressions in SQLite. > >For instance, i want to be able to use Case when i execute my sql so >that i have a row which looks up a value rather than querying it from a >table > If you just want to use CASE to do the lookup with hard coded values, th

Re: [sqlite] large table performance

2006-03-03 Thread drh
"Daniel Franke" <[EMAIL PROTECTED]> wrote: >> > Another question that arose today: > Is there any penalty for switching tables during INSERTs within the > same COMMIT? E.g. > > BEGIN; > INSERT INTO tableA VALUES ...; > INSERT INTO tableB VALUES ...; > INSERT INTO tableA VALUES ...

Re: [sqlite] Re: large table performance

2006-03-03 Thread Christian Smith
On Fri, 3 Mar 2006, Daniel Franke wrote: > >Another question that arose today: >Is there any penalty for switching tables during INSERTs within the >same COMMIT? E.g. > >BEGIN; >INSERT INTO tableA VALUES ...; >INSERT INTO tableB VALUES ...; >INSERT INTO tableA VALUES ...; >INSE

Re: [sqlite] Re: large table performance

2006-03-03 Thread Elrond
On Fri, Mar 03, 2006 at 04:00:58PM +0100, Daniel Franke wrote: [...] > > Finally, parsing a few million INSERT statements is very fast > > in SQLite but it still takes time. You can increase the speed > > by a factor of 3 or more by using prepared statements, if you > > are not already. > As I und

[sqlite] Re: large table performance

2006-03-03 Thread Daniel Franke
> > CREATE TABLE genotypes( > > markerid integer NOT NULL REFERENCES marker(id), > > individualid integer NOT NULL REFERENCES individuals(id), > > genA integer, > > genB integer, > > UNIQUE(markerid, individualid)); > > > > CREATE INDEX genotypeidx ON genotypes(markerid, individ

Re: [sqlite] large table performance

2006-03-03 Thread Elrond
While talking performance: Did anyone compare sqlite in a simplistic CREATE TABLE t(key BLOB PRIMARY KEY, value BLOB); scenario to other dedicated key/value DBs (like berkeley deb, gdbm, ...)? Elrond

Re: [sqlite] Busy management

2006-03-03 Thread Jay Sprenkle
On 3/3/06, Ludovic Ferrandis <[EMAIL PROTECTED]> wrote: > I want to manage the SQLITE_BUSY error like this: If it fails, sleep X > ms then try the command Y times. I found 2 ways to do it: I do it using sqlite3_step(); Using bound variables and step eliminates the need for escaping string data and

Re: [sqlite] Using SQLite on networked drive

2006-03-03 Thread Clay Dowling
Deepak Kaul said: > I was tasked to use sqlite on a NFS mount on MacOSX 10.4. I had > numerous problems with it because MacOSX does not implement locks > properly. It would run for about 15 minutes or so and then I would > start receiving Database Malformed errors. I had to come up with a > dif

Re: [sqlite] Using SQLite on networked drive

2006-03-03 Thread Deepak Kaul
I was tasked to use sqlite on a NFS mount on MacOSX 10.4. I had numerous problems with it because MacOSX does not implement locks properly. It would run for about 15 minutes or so and then I would start receiving Database Malformed errors. I had to come up with a different solution. I came

Re: [sqlite] large table performance

2006-03-03 Thread drh
Daniel Franke <[EMAIL PROTECTED]> wrote: > > Is there any chance to speed this up? > > CREATE TABLE genotypes( > markerid integer NOT NULL REFERENCES marker(id), > individualid integer NOT NULL REFERENCES individuals(id), > genA integer, > genB integer, > UNIQUE(markerid, ind

RE: [sqlite] large table performance

2006-03-03 Thread Brandon, Nicholas (UK)
>Given the schema below, feeding a million INSERTs into the database by >sqlite3_exec() takes about 30 minutes (this includes transactions, indices >and "PRAGMA synchronous=off" as well as a fully optimized build of sqlite). >Is there any chance to speed this up? Production datasets could easil

[sqlite] Busy management

2006-03-03 Thread Ludovic Ferrandis
Hi, Newbie to SQLite, so maybe my question will seems trivial. I want to manage the SQLITE_BUSY error like this: If it fails, sleep X ms then try the command Y times. I found 2 ways to do it: - First is to manage a loop like: tryIt = X; do { err = sqlite3_exec(...) } while (err ==

Re: [sqlite] Using SQLite on networked drive

2006-03-03 Thread Vishal Kashyap
Dear Ray , > I would be interested in knowing how you handle simulatneous inserts and/or > updates... Their is a possibility of simultaneous selects thats all. Moreover the shared drive would be mapped -- With Best Regards, Vishal Kashyap. http://www.vishal.net.in

RE: [sqlite] libsqlite3-dev sources

2006-03-03 Thread Chethana, Rao \(IE10\)
Hi! You can check out this (website)page which I've sent as an attachment. Kind regards, Chethana. -Original Message- From: Alex Greif [mailto:[EMAIL PROTECTED] Sent: Friday, March 03, 2006 1:09 AM To: sqlite-users@sqlite.org Subject: [sqlite] libsqlite3-dev sources

[sqlite] libsqlite3-dev sources

2006-03-03 Thread Alex Greif
Hi, where can I find the sources for libsqlite3-dev? I would like o compile and install it my self, because I have no root rights on our suse Linux system. cheers, Alex.

[sqlite] Expressions

2006-03-03 Thread Roger
How do i use expressions in SQLite. For instance, i want to be able to use Case when i execute my sql so that i have a row which looks up a value rather than querying it from a table

Re: [sqlite] large table performance

2006-03-03 Thread Bogusław Brandys
Daniel Franke wrote: Hi all. I spent the last days bragging that a single database file as provided by sqlite is a far better approach to store data than -literally- thousands of flat files. Now, I got a small amount of testing data an wow ... I'm stuck. Area: Bioinformatics. Imagine a matri