Re: [sqlite] about journal file

2009-08-27 Thread Dan Kennedy
On Aug 28, 2009, at 11:30 AM, Zhanjun You wrote: > Date: Thu, 27 Aug 2009 21:50:15 -0400 > From: "Igor Tandetnik" > Subject: Re: [sqlite] about journal file > To: sqlite-users@sqlite.org > Message-ID: > > Zhanjun You wrote: >> I can not find how

Re: [sqlite] about journal file

2009-08-27 Thread Zhanjun You
Date: Thu, 27 Aug 2009 21:50:15 -0400 From: "Igor Tandetnik" Subject: Re: [sqlite] about journal file To: sqlite-users@sqlite.org Message-ID: Zhanjun You wrote: > I can not find how to implement the method to deal with journal > files What do

Re: [sqlite] Regarding Memory Database

2009-08-27 Thread shankar m
Its not a problem in SQLite. I need a feature enhancement. Currently in SQLite i can allocate memory in a block. Example: 2.5MB memory for memsys5 memory pool. Here 2MB i am using for Mem Db and 0.5MB for heap and other DB cache. I want flexibility such that when i close mem db, the 2MB should

Re: [sqlite] Conditional triggers

2009-08-27 Thread Dennis Volodomanov
> CREATE TRIGGER countOfTypesInabc AFTER INSERT ON abc > BEGIN > UPDATE countOfTypesInabc SET count = count+1 WHERE TypeID = > new.TypeID; > END I understand now what you meant - yes, that makes sense and is probably the easiest way to go. > You will have to add something for

Re: [sqlite] Conditional triggers

2009-08-27 Thread Simon Slavin
On 28 Aug 2009, at 3:27am, Dennis Volodomanov wrote: > CREATE TRIGGER CountTypeA AFTER INSERT ON abc /* when abc.TypeID == > 1 */ BEGIN > UPDATE abcCount SET TypeCountA=TypeCountA+1; END > > CREATE TRIGGER CountTypeB AFTER INSERT ON abc /* when abc.TypeID == > 2 */ BEGIN > UPDATE

Re: [sqlite] Conditional triggers

2009-08-27 Thread Igor Tandetnik
Dennis Volodomanov wrote: > Is it possible to create such an AFTER INSERT trigger that updates > certain fields in a table based on the actual data being inserted? > > Let's say: > > CREATE TABLE abc(TypeID INTEGER) > CREATE TABLE abcCount(TypeCountA, TypeCountB) > > CREATE TRIGGER CountTypeA

Re: [sqlite] Conditional triggers

2009-08-27 Thread Dennis Volodomanov
> Instead of keeping your total in abcCount, make another table > especially for counts > > countType number > abc 27 > def 14 > > and use the TRIGGER to update that table. I could do that, but I still don't know when to update abc and when to update def, based on the

Re: [sqlite] Conditional triggers

2009-08-27 Thread Simon Slavin
On 28 Aug 2009, at 3:27am, Dennis Volodomanov wrote: > CREATE TRIGGER CountTypeA AFTER INSERT ON abc /* when abc.TypeID == > 1 */ BEGIN > UPDATE abcCount SET TypeCountA=TypeCountA+1; END > > CREATE TRIGGER CountTypeB AFTER INSERT ON abc /* when abc.TypeID == > 2 */ BEGIN > UPDATE

[sqlite] Conditional triggers

2009-08-27 Thread Dennis Volodomanov
Hello all, Is it possible to create such an AFTER INSERT trigger that updates certain fields in a table based on the actual data being inserted? Let's say: CREATE TABLE abc(TypeID INTEGER) CREATE TABLE abcCount(TypeCountA, TypeCountB) CREATE TRIGGER CountTypeA AFTER INSERT ON abc /* when

Re: [sqlite] about journal file

2009-08-27 Thread Igor Tandetnik
Zhanjun You wrote: > I can not find how to implement the method to deal with journal > files What do you mean by "deal" here? What exactly are you trying to do with them, that you cannot achieve simply by beginning and then committing a transaction? Igor Tandetnik

[sqlite] about journal file

2009-08-27 Thread Zhanjun You
I can not find how to implement the method to deal with journal files, and I also found that no one to discuss this issue that do not need to work with these? Or say that this issue is too simple do not need to ask. I am dumb, I hope someone can help me

Re: [sqlite] Trouble running sqlite3 in ubuntu linux 9.04

2009-08-27 Thread Paul Whipp
> > Go to the website and download three source files (all conveniently > packaged in a tarball on the download page): > > sqlite3.c > sqlite3.h > shell.c > > Then run: > > gcc -static -o sqlite3 -DSQLITE_THREADSAFE=0 sqlite3.c shell.c -ldl > > Then move the resulting stand-alone,

Re: [sqlite] Detecting database corruption

2009-08-27 Thread Simon Slavin
On 27 Aug 2009, at 10:25pm, D. Richard Hipp wrote: > Chim is using a version of SQLite that is over 5 years old. The > behavior he describes is not present in any recent version of SQLite, > at least not as far as anyone is aware. Okay, problem solved. Thanks. Simon.

Re: [sqlite] Insert into 2 tables

2009-08-27 Thread Kit
2009/8/27 Igor Tandetnik : > Or else, create the unique index on authors.author as originally > planned, then use INSERT OR IGNORE to skip over errors. > Igor Tandetnik Super! I lost some hours for finding a solution today. -- Kit CREATE TABLE booklist(author TEXT, book

Re: [sqlite] Detecting database corruption

2009-08-27 Thread D. Richard Hipp
On Aug 27, 2009, at 5:05 PM, Simon Slavin wrote: > > On 27 Aug 2009, at 10:03pm, Chang Im (chim) wrote: > >> 1. pragma integrity_check >> >> It seems for a certain corruption, this command never returns. I >> have >> one database where the cmd ran 14 hours of CPU time, but it never >> came

Re: [sqlite] Insert into 2 tables

2009-08-27 Thread Igor Tandetnik
Kit wrote: > Hi there, > > I have single table: > CREATE TABLE booklist(author TEXT, book TEXT); > --- > Tolkien The Hobbit > Hemingway The Old Man and the Sea > VerneTwenty Thousand Leagues under > Hemingway A Farewell to

[sqlite] Insert into 2 tables

2009-08-27 Thread Kit
Hi there, I have single table: CREATE TABLE booklist(author TEXT, book TEXT); --- Tolkien The Hobbit Hemingway The Old Man and the Sea VerneTwenty Thousand Leagues under Hemingway A Farewell to Arms Tolkien The Lord of the Rings

Re: [sqlite] Detecting database corruption

2009-08-27 Thread Simon Slavin
On 27 Aug 2009, at 10:03pm, Chang Im (chim) wrote: > 1. pragma integrity_check > > It seems for a certain corruption, this command never returns. I have > one database where the cmd ran 14 hours of CPU time, but it never came > back. How do you tell when to stop in a case like this? I cannot

[sqlite] Detecting database corruption

2009-08-27 Thread Chang Im (chim)
Hi, I posted a similar question under "integrity check", but did not get much attention. I am a newcomer to SQLite and we uses SQLite 2 database in our embedded product line. As database corruption could happen due to various reasons, how do folks detect it, especially in embedded environment.

[sqlite] Query performance on AIX

2009-08-27 Thread Ken
Hi I've encountered some really differing performance results for a query on the AIX platform. I could you some help with this. The query performs a union and an order by its large and complicated. But here is a "Watered down" version: select id, xl.srcn srcn col1, ... coln from ktab, xlist

Re: [sqlite] Viable alternatives to SQL?

2009-08-27 Thread Darren Duncan
Kelly Jones wrote: > Many sites let you search databases of information, but the search > queries are very limited. A fact I can agree with time and again. > I'm creating a site that'll allow arbitrary SQL queries to my data (I > realize I'll need to handle injection attacks). Now by "arbitrary

Re: [sqlite] Index performance using 2 integers vs. 1 float

2009-08-27 Thread Kosenko Max
danjenkins wrote: > > Hello, > We use a julian.decimal format to represent date/time (i.e. noon of August > 26, 2009 would be 40049.5000) and we use this julian date for an index > key. Our databases are frequently up to 3GB in size containing 10 million > records with 15 assorted field types

[sqlite] Viable alternatives to SQL?

2009-08-27 Thread Kelly Jones
Many sites let you search databases of information, but the search queries are very limited. I'm creating a site that'll allow arbitrary SQL queries to my data (I realize I'll need to handle injection attacks). Are there other viable ways to query data? I read a little on "Business System 12"

Re: [sqlite] Software operation and ETL tools

2009-08-27 Thread Tguru
Open source software companies, such as Talend, offer training to their users. You are able to get a full training in three days on an open source ETL tool. Talend gives an on-site extensive training to their customers. A roadshow also goes through many cities in the US and in Europe to

Re: [sqlite] Regarding Memory Database

2009-08-27 Thread Pavel Ivanov
OK. So you have allocated memsys5 memory pool and now are complaining that this memory is not returned to OS? Sorry, but it's not quite understandable what do you want to achieve, what's the problem with it and how did you find that there's a problem. Pavel On Thu, Aug 27, 2009 at 6:11 AM,

Re: [sqlite] triggers question, OLD reference is not available after SET statment

2009-08-27 Thread Simon Davies
2009/8/27 Jarod Tang : > Hi List users, > > In my code, i create two triggers (Trigger_A, Trigger_B) on a table ( > sample_db), but after execution, it's found that Trigger_A is not executed > correctly ( old.msg_box hasnt be put into table log ). And it seems to me > that

Re: [sqlite] Regarding Memory Database

2009-08-27 Thread shankar m
I have allocated memory for SQLite heap and using memsys5 memory pool algorithm to manage the heap. So if free is called it will be added to free list of memsys5 memory pool. Regards Shankar On Wed, Aug 26, 2009 at 7:51 PM, Pavel Ivanov wrote: > And I mean that you're wrong

[sqlite] SQLITE_BUSY on a remote server host

2009-08-27 Thread Otto Palmu
Hello, as a beginning SQlite user, I'm trying to build a simple request counter for a web site on top of SQlite (version 3.6.6.2). I started off with the following simple and unfinished test code, which works fine on my home computer (Ubuntu 9.04), but on our hosted server I always get an error

[sqlite] triggers question, OLD reference is not available after SET statment

2009-08-27 Thread Jarod Tang
Hi List users, In my code, i create two triggers (Trigger_A, Trigger_B) on a table ( sample_db), but after execution, it's found that Trigger_A is not executed correctly ( old.msg_box hasnt be put into table log ). And it seems to me that SqlLite invalids the OLD reference after it found it be