Re: [sqlite] many-one relation

2007-10-08 Thread chetana bhargav
>> Is this a garbage collection situation, where you want a row in B to go away 
>> when all referring rows in A are deleted? 

Yes exactly this is what I wanted :)

Sorry for the confusing message earlier

-x-
Chetana



- Original Message 
From: Trevor Talbot <[EMAIL PROTECTED]>
To: sqlite-users@sqlite.org
Sent: Monday, October 8, 2007 9:10:22 PM
Subject: Re: [sqlite] many-one relation


On 10/8/07, chetana bhargav <[EMAIL PROTECTED]> wrote:

> We got two tables, tableA & tableB.
>
> tableB is turning out to be a many-one relation where in we have many rows of 
> tableA mapping to one row of tableB, would like to know what is the best way 
> to delete a row in tableB
>
> 1. Keep a reference count of the number of rows that are referring to this ( 
> to be honest I dont think this is good)
> 2. More on similar lines instead of count have row-ids and attach a trigger

I'm not clear on the scenario here.  Is this a like a foreign key
relationship, so you want a delete of a row in table B to delete all
referring rows from A?   Something else?

-
To unsubscribe, send email to [EMAIL PROTECTED]
-


  

Tonight's top picks. What will you watch tonight? Preview the hottest shows on 
Yahoo! TV.
http://tv.yahoo.com/ 


[sqlite] many-one relation

2007-10-08 Thread chetana bhargav
Hi All,

We are designing a data base landed in some problems would like to know what 
approach is the best.

We got two tables, tableA & tableB. 

tableB is turning out to be a many-one relation where in we have many rows of 
tableA mapping to one row of tableB, would like to know what is the best way to 
delete a row in tableB

1. Keep a reference count of the number of rows that are referring to this ( to 
be honest I dont think this is good)
2. More on similar lines instead of count have row-ids and attach a trigger


-x-
Chetana


  

Catch up on fall's hot new shows on Yahoo! TV. Watch previews, get listings, 
and more!
http://tv.yahoo.com/collections/3658 

Re: [sqlite] Re: Auto Increment of Integer Primary Key

2007-08-13 Thread chetana bhargav
I think if it would have been unsigned we could have got more range, as anyways 
negative numbers doesn't make sense as PK's, of course reaching the 2^63-1 is 
remote (or probably impossible)

-x-
Chetana


- Original Message 
From: Igor Tandetnik <[EMAIL PROTECTED]>
To: SQLite 
Sent: Monday, August 13, 2007 5:31:22 PM
Subject: [sqlite] Re: Auto Increment of Integer Primary Key


Sreedhar.a
 wrote:
> "create table Test(id integer primary key,player char);"
> "insert into Test(id,player) values(2,'surya');"
> "insert into Test(id,player) values(9223372036854775807,'sree');"
> "insert into Test(id,player) values(9223372036854775808,'sree1');"
> "select * from Test;"
>
> The result is
>
> -9223372036854775808sree1
> 2surya
> 9223372036854775807sree
>
> I tried inserting 2 power 63 value but the database has converted it
> to -2 power 63 and stored.
> Can anyone explain why this has happened.

SQLite stores ROWIDs as signed 64-bit integers. Such an integer can 
represent 2^64 distinct values, in the range [-2^63, 2^63-1]. 2^63 is 
not representable, it wraps around to -2^63.

Igor Tandetnik 


-
To unsubscribe, send email to [EMAIL PROTECTED]
-


   

Be a better Heartthrob. Get better relationship answers from someone who knows. 
Yahoo! Answers - Check it out. 
http://answers.yahoo.com/dir/?link=list=396545433

Re: [sqlite] Re: multiple selects in a single prepare

2006-12-29 Thread chetana bhargav
Actually I am trying to retrieve values in a single step.

My queries need to be something like,

select count(*) from tbl1 where state='Normal';select count(*) from tbl1 where 
state='Critical'

I got to have these two as seperate, because if there's any critical need to 
display a diff icon, and also the sum of those results. So wondering how can I 
avoid two table scans, and instead try to retrieve them in a single statement.

..
Chetana

- Original Message 
From: A. Pagaltzis <[EMAIL PROTECTED]>
To: sqlite-users@sqlite.org
Sent: Thursday, December 28, 2006 11:21:28 AM
Subject: [sqlite] Re: multiple selects in a single prepare


* chetana bhargav <[EMAIL PROTECTED]> [2006-12-28 06:00]:
> Just wanted to know can we have multiple quries in a single
> prepare statement seperated by semicolons.Something like,
> 
> Select count(*) from tbl where name="foo";select count(*) from tbl1 where 
> name = "bar"

Just how is that supposed to work?

Are you looking for the UNION operator, perchance?

Regards,
-- 
Aristotle Pagaltzis // <http://plasmasturm.org/>

-
To unsubscribe, send email to [EMAIL PROTECTED]
-

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

[sqlite] multiple selects in a single prepare

2006-12-27 Thread chetana bhargav
Hi,

Just wanted to know can we have multiple quries in a single prepare statement 
seperated by semicolons.Something like,

Select count(*) from tbl where name="foo";select count(*) from tbl1 where name 
= "bar"


...
Chetana.

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

[sqlite] conditional code in trigger

2006-12-20 Thread chetana bhargav
Hi ,

I have two seperate triggers like,

CREATE TRIGGER cnt1
  AFTER INSERT
  ON tbl1
  WHEN (new.Id =1 and new.priority > 2 )
BEGIN
  update cnt set Critical = (SELECT Critical from msgs_cnt where Id=1) + 1 
where Id=1;
 end;

CREATE TRIGGER cnt2
  AFTER INSERT
  ON tbl1
  WHEN (new.Id =1 and new.priority < 2 )
BEGIN
  update cnt set Normal = (SELECT Normal from cnt where Id=1) + 1 where Id=1;
 end;

I am trying to combine these two trigs into one using if..else condition is it 
possible.

When i try it its giving me error. I tried the following way

CREATE TRIGGER cnt1
  AFTER INSERT
  ON tbl1
  WHEN (new.Id =1 )
BEGIN
 if( new.priority > 2)
  update cnt set Critical = (SELECT Critical from msgs_cnt where Id=1) + 1 
where Id=1;
else 
  update cnt set Normal = (SELECT Normal from cnt where Id=1) + 1 where Id=1;
end;


Is it possible to do some thing like this or it's too much of C.

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: [sqlite] problem with Triggers

2006-11-30 Thread chetana bhargav
But should it cause the prepare's to fail, because of not having the function 
registered.

...
Chetana.


- Original Message 
From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
To: sqlite-users@sqlite.org
Sent: Thursday, November 30, 2006 11:43:34 PM
Subject: Re: [sqlite] problem with Triggers


chetana bhargav <[EMAIL PROTECTED]> wrote:
> Hi,
> 
> I was trying out to test some trigger stuff, basically 
> if I have 2 connections open,  and one of the connection
> registered a user defined function  to be invoked. Now
> when the other connection inserts into table was trying
> to see if the first functions registered function is
> called or not.

Triggers run in the same connection as the statement that
invoked the trigger runs.  Triggers do not do IPC.

--
D. Richard Hipp  <[EMAIL PROTECTED]>


-
To unsubscribe, send email to [EMAIL PROTECTED]
-


 

Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail beta.
http://new.mail.yahoo.com

[sqlite] problem with Triggers

2006-11-30 Thread chetana bhargav
Hi,

I was trying out to test some trigger stuff, basically if I have 2 connections 
open,  and one of the connection registered a user defined function  to be 
invoked. Now when the other connection inserts into table was trying to see if 
the first functions registered function is called or not.

I am having a trigger in this format,

CREATE TRIGGER trigs_partid_t01
AFTER INSERT
  ON ids
BEGIN 
 SELECT foo_bar_trigs(new.mId);
END;

I have proper implementation for the foo_bar_trigs function registered in the 
first function, and that is open always.

When I prepared a statement to insert in the second connection, while 
preparing,  I am getting an error as, "no such function: foo_bar_trigs".

Is it always necessary that the second function also need to have this function 
registered, as I am not even able to prepare a statement, and its coming out 
with this error.


...
Chetana.


 

Cheap talk?
Check out Yahoo! Messenger's low PC-to-Phone call rates.
http://voice.yahoo.com

[sqlite] indexes in memory

2006-11-09 Thread chetana bhargav
Hi,

I have a question regrading indexes,

When I open a connection,

  Will indexes be loaded into memory. If one of the tables in the DB, the 
connection for which I have opened, has an index.
  If, so is there any way to selectively load/unload that from memory.


...
Chetana.



Re: [sqlite] Loading a table into memory

2006-11-07 Thread chetana bhargav
I am trying for loading only that table one into memory. Beacuse in my DB I 
have two or more three table which are quite large and I don't want to waste 
memory.  Is it possible that way.

...
Chetana.


- Original Message 
From: Jay Sprenkle <[EMAIL PROTECTED]>
To: sqlite-users@sqlite.org
Sent: Tuesday, November 7, 2006 10:56:07 AM
Subject: Re: [sqlite] Loading a table into memory


you can use a database named  :memory:
Is that what you were looking for?


On 11/6/06, chetana bhargav <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have a read only table, which is very small(Bytes of storage 
> consumed. 1024 from the analyzer). I am wondering is there any 
> way to load this table in memory and unload it later.
--
SqliteImporter and SqliteReplicator: Command line utilities for Sqlite
http://www.reddawn.net/~jsprenkl/Sqlite

Cthulhu Bucks!
http://www.cthulhubucks.com

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] Sqlite DB file sizes

2006-11-06 Thread chetana bhargav
Try to see the reply, at

http://www.mail-archive.com/sqlite-users@sqlite.org/msg19255.html

...
Chetana


- Original Message 
From: Dave Gierok <[EMAIL PROTECTED]>
To: "sqlite-users@sqlite.org" 
Sent: Monday, November 6, 2006 10:10:39 PM
Subject: RE: [sqlite] Sqlite DB file sizes


How difficult would it be to change my version of Sqlite such that it uses 
32-bit floats instead of doubles for REAL values in :memory: databases (or even 
all databases)?  Could you point me in the right direction?  We are in a real 
shortage for RAM in our game.

I appologize if this is the second time this was sent out.  It appears as 
though the last time I sent this it did not make it out -- at least I never 
received the mail.

Thank you very much,
Dave Gierok

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 01, 2006 5:12 PM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] Sqlite DB file sizes

Dave Gierok <[EMAIL PROTECTED]> wrote:
> So, how is data represented in a :memory: db?  Are :memory: db's different =
> in the way they store their data in memory vs. the way a file db stores its=
>  data to file?  Or is it as simple as instead of writing to file, it writes=
>  to memory?  If they are the same, are :memory: db's still cached?
>

A :memory: db is just the cache with the write-to-disk function
disabled.
--
D. Richard Hipp  <[EMAIL PROTECTED]>


-
To unsubscribe, send email to [EMAIL PROTECTED]
-


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] Sqlite DB file sizes

2006-11-06 Thread chetana bhargav
Pls see this message.

http://www.mail-archive.com/sqlite-users@sqlite.org/msg19255.html

...
Chetana.


- Original Message 
From: Dave Gierok <[EMAIL PROTECTED]>
To: "sqlite-users@sqlite.org" 
Sent: Monday, November 6, 2006 10:10:39 PM
Subject: RE: [sqlite] Sqlite DB file sizes


How difficult would it be to change my version of Sqlite such that it uses 
32-bit floats instead of doubles for REAL values in :memory: databases (or even 
all databases)?  Could you point me in the right direction?  We are in a real 
shortage for RAM in our game.

I appologize if this is the second time this was sent out.  It appears as 
though the last time I sent this it did not make it out -- at least I never 
received the mail.

Thank you very much,
Dave Gierok

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 01, 2006 5:12 PM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] Sqlite DB file sizes

Dave Gierok <[EMAIL PROTECTED]> wrote:
> So, how is data represented in a :memory: db?  Are :memory: db's different =
> in the way they store their data in memory vs. the way a file db stores its=
>  data to file?  Or is it as simple as instead of writing to file, it writes=
>  to memory?  If they are the same, are :memory: db's still cached?
>

A :memory: db is just the cache with the write-to-disk function
disabled.
--
D. Richard Hipp  <[EMAIL PROTECTED]>


-
To unsubscribe, send email to [EMAIL PROTECTED]
-


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



[sqlite] Loading a table into memory

2006-11-06 Thread chetana bhargav
Hi,

I have a read only table, which is very small(Bytes of storage 
consumed. 1024 from the analyzer). I am wondering is there any way 
to load this table in memory and unload it later.


...
Chetana.



Re: [sqlite] Re: Re: Testing For Empty Table

2006-11-04 Thread chetana bhargav
Just wanted to know doesn't the use of "LIMIT 1 " optimise it.

select count(*) from component where category='natural' limit 1


...
Chetana.




- Original Message 
From: Igor Tandetnik <[EMAIL PROTECTED]>
To: SQLite 
Sent: Sunday, November 5, 2006 5:28:23 AM
Subject: [sqlite] Re: Re: Testing For Empty Table


Rich Shepard <[EMAIL PROTECTED]> wrote:
>   I want the latter case. In other words, if there are no records
> where 'category = "natural"' nothing should be returned. It would be
> nice if there was a return value that told me explicitly "no records
> match the where".

You could write

select exists (select * from component where category='natural');

This produces a singleton result (single row, single column). The only 
cell of this result contains integer 1 if there are indeed rows with 
category='natural' in table component, and 0 if there are none.

I still don't understand why you want to "look before you leap", so to 
speak. Why not just run the query

select * from component where category='natural';

and handle the case where it produces an empty result set?

Igor Tandetnik 


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



[sqlite] Indexes analysis

2006-10-31 Thread chetana bhargav
Hi,

I am trying to analyze index usage for my queries for performance.

Basically I found two methods,  
One of them EXPLAIN QUERY METHOD.
And the other is idxChk tool.

My DB is of latest version of 3.3.8.

When I checked for idxChk tool page it says it was tested only till 3.2.7. Just 
wanted to know is it still supported on latest version also. 

And regarding EXPLAIN QUERY METHOD, I seem to be getting some error. It just 
says,

"0|0|TABLE table_acc WITH INDEX IDX_ACC_ID_STATE"

But when I try to use EXPLAIN its giving complete info. Just wanted to know 
whats the error.

Is the above statement is correct or what? Is there any way to interpret this.

...
Chetana.



[sqlite] unsigned shorts in bindInt on ARM

2006-10-20 Thread chetana bhargav
Hi,

I saw a strnage problem using unsigned shorts, not sure if any one saw that, I 
was using an unsigned short for binding it to integer, the lint wasn't 
complaining and everything seem to go ahead fine, when I tested that on 
windows, all my querys were returning as expected. But when I moved my code to 
ARM platform, all my queries were failing, the reason was that as I used 
unsigned short for binding with int, it was taking zero.

Any idea why this would be so, is it compiler problem as to how it intrepets 
that data.? Of course when I changed the data type to int everything went ahead 
fine. Wanted to know if any one saw this.

Just wanted to let people know if anyone intends to use uint16's on ADS1.2 be 
prepared for strange results.


...
Chetana.



[sqlite] Journal file and EFS space

2006-10-11 Thread chetana bhargav
Hi,

We are using embedded flash file system, now we have catch22 situation.

When the EFS is full (we seeing this when we have <13k on EFS, ofcourse out of 
that 13k some will go for system) , the users aren't able to delete any content 
from the EFS. sqllite3_step() is returning error. We suspect that its not able 
to create the journal needed for the transaction. 

Tried using different approaches, like enclosing that in a begin/end 
transaction and so, but nothing did work out, so we are assuming that may be 
the reason.

Wanted to know, like whats the optimal amount of EFS usually that we have to 
reserve so atleast the user can delete one object from the table so that he can 
make further deletes.


...
Chetana.



[sqlite] PK and rowid

2006-10-11 Thread chetana bhargav
Hi,
   
  If I declare my column as,  "uniqId integer primary key", now if I say 
something like,
  select * from tbl1 where uniqId=x;
   
  Will the uniqId be same as rowid, making my table look ups faster as I am 
using row id only. If not whats the way to assign my uniqId to the row id so 
that my lookups would be faster.
   
   
  ...
  Chetana.


-
Do you Yahoo!?
 Everyone is raving about the  all-new Yahoo! Mail.

[sqlite] transaction and tables

2006-10-09 Thread chetana bhargav
Hi,
   
  I have a query regarding transactions and tables.
   
  Say in a DB if you have 4 tables, now in my code  I will say , "begin 
transaction" and start modifying a table, say tbl1, now a journal would be 
backed up for the tbl1 that I am going to modify, now if in the same 
transaction if I try to modify a different table, say tbl2,  in the same DB, 
will the multiple inserts into the tbl2 will be fast as we have already a 
journal created. 
   
  If at this point the power goes off, will tbl2 be consistent?
   
  And one more question,
  If in my code if I call "begin transaction" on the same DB twice due to some 
logical flow error, will it have any effect.
   
   
  ...
  Chetana.


-
Get your email and more, right on the  new Yahoo.com 

Re: [sqlite] Bind

2006-09-21 Thread chetana bhargav
Hi Dennis,
   
  Sorry that I put my question wrongly, actually my question was, if before a 
step function is called, can I change the value that is bounded as many times 
as possible, and will the Step function only consider the value that was 
bounded last.
   
  .
  Chetana...

Dennis Cote <[EMAIL PROTECTED]> wrote:
  chetana bhargav wrote:
> 
> I am just wondering what will happen, if I bind a column with null intially, 
> but later in my path if I bind some integer value, which value will be 
> considered while excuting step function. Note its on the same prepared 
> statement and before doing a reset of the statement.
> 
> 

Chetana,

You can't change the value bound to a parameter while a statement is 
executing (i.e. after the first step and before a reset). You will get a 
misuse error. You can only bind the parameter values before the the 
first step (or after a reset which is really the same thing).

HTH
Dennis Cote
> 
> 


-
To unsubscribe, send email to [EMAIL PROTECTED]
-




-
Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls.  Great rates 
starting at 1¢/min.

[sqlite] Bind

2006-09-21 Thread chetana bhargav
Hi,
   
  I am just wondering what will happen, if I bind a column with null intially, 
but later in my path if I bind some integer value, which value will be 
considered while excuting step function. Note its on the same prepared 
statement and before doing a reset of the statement.
   
  .
  Chetana...


-
Do you Yahoo!?
 Everyone is raving about the  all-new Yahoo! Mail.

[sqlite] trigger and schema error

2006-09-13 Thread chetana bhargav
Hi,
   
  Wanted to conform once, I am caching some of the prepared statements in 
memory, now if some one adds a trigger to another table in the same DB. Do we 
still get schema change error.
   
  -Chetan


-
Do you Yahoo!?
 Everyone is raving about the  all-new Yahoo! Mail.

[sqlite] Reg number of tables.

2006-09-08 Thread chetana bhargav
Hi,
   
  I wanted to know will there be any performance impact if the number of tables 
in a DB grow. I am planning to have around 8-9 tables in a single DB, so want 
to make sure does it have any affect. Is there any number for optimal usage. 
Apart from tables we may have indexes (of course not on all tables) and some 
triggers.
   
  ...
  Chetana.
   
   


-
Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls.  Great rates 
starting at 1¢/min.

Re: [sqlite] pre-compiling prepared statements

2006-09-01 Thread chetana bhargav
It does make a difference with embedded deivces, where both speed and memory 
constraints matter a lot.
   
  -Chetan.

Jay Sprenkle <[EMAIL PROTECTED]> wrote:
  On 9/1/06, John Stanton wrote:

> I believe that Dr Hipp has available a special version of Sqlite which
> stores prepared statements. It has restrictions which may make it
> unsuitable for general purpose applications, but could be the answer
> this user is looking for.
>
> For the benefit of the user, sqlite3_prepare compiles an Sqlite
> statement but the compilation is only valid for the life of the
> process and while the schema is not altered. It also requires that
> the raw SQL be in memory at some stage.

What's the benefit there?
Isn't preparation time so minimal as to be insignificant?
If the few milliseconds your program will save are significant you probably
should be using something other than sql to store the data.

-
To unsubscribe, send email to [EMAIL PROTECTED]
-




-
Stay in the know. Pulse on the new Yahoo.com.  Check it out. 

Re: [sqlite] pre-compiling prepared statements

2006-09-01 Thread chetana bhargav
Hi All,
   
  I know that we can use sqlite3_prepare, proabably my perception is wrong, 
when I say sqlite3_prepare I am thinking the opcodes which ever is necessary to 
run the query is created upon this call, and we can keep filling the various 
values by just resetting the prepared statements and re use it over and over, 
What I want to know is this whether the opcode generation will happen in 
compile time or when you make a call to sqlite3_prepare while running. If 
during running can I make some of the statements selectively to generate these 
opcodes during compile time itself.
   
  If any one can explain me correctly what sqlite3_prepare does apart from 
preparing the statement, and does prepare means generating the byte codes 
necessary.
   
  Thanks in advace,
   
  -Chetan.
Jay Sprenkle <[EMAIL PROTECTED]> wrote:
  On 9/1/06, chetana bhargav wrote:
> Hi,
>
> Is there any way to pre compile some of the prepared statements during 
> compile time. I am having 4 tables of which two tables doesn't create any 
> triggers/joins. I am basically trying to speed up the queries on these tables 
> (as they are most frequently used). I am looking for ways so that I can keep 
> them prepared always, not in memory though as that would be too much.

Certainly!
http://sqlite.org/capi3ref.html#sqlite3_prepare

-
To unsubscribe, send email to [EMAIL PROTECTED]
-




-
Get your own web address for just $1.99/1st yr. We'll help. Yahoo! Small 
Business.

[sqlite] pre-compiling prepared statements

2006-08-31 Thread chetana bhargav
Hi,
   
  Is there any way to pre compile some of the prepared statements during 
compile time. I am having 4 tables of which two tables doesn't create any 
triggers/joins. I am basically trying to speed up the queries on these tables 
(as they are most frequently used). I am looking for ways so that I can keep 
them prepared always, not in memory though as that would be too much.
   
  -Chetan. 


-
Stay in the know. Pulse on the new Yahoo.com.  Check it out. 

[sqlite] More on triggers

2006-08-10 Thread chetana bhargav
Hi,
   
  I just want to confirm one more thing,
   
  If two tasks create two seperate triggers each of its own, on the same 
condition each not caring whether already a trigger exists, and both of them 
had opened a session,
  now if the trigger is fired which one will be notified?
   
  1) First is it possible to create triggers like that.(the way i mentioned)
   
  2) Do both apps gets notified if their connections are still open.


-
Get your email and more, right on the  new Yahoo.com 

Re: [sqlite] About Triggers

2006-08-07 Thread chetana bhargav
- Last time I tried, the triggers are triggered only for the calling
thread which registered the function.
   
  Can you elobarate more on this. ( For me if two threads register for the same 
trigger condition, with different callback functions, do both the functions get 
called)
   
  
  Cheers,
   
  Chetan


Roberto <[EMAIL PROTECTED]> wrote:
  - Last time I tried, the triggers are triggered only for the calling
thread which registered the function.
- When the trigger is fired, you can refer to any field in the table.
HTH.

On 07/08/06, chetana bhargav wrote:
> Hi,
>
> I have few questions regarding triggers,
>
> * If we want to have trigger for some condition and if multiple applications 
> create a trigger for the same condition providing different C callback 
> functions (which I guess is possible through sqlite3_create_function), will 
> the trigger be fired to all the registered apps.
>
> * Is it possible to get the rowid for which the trigger is fired,
>
>
> -
> See the all-new, redesigned Yahoo.com. Check it out.
>



-
Do you Yahoo!?
 Next-gen email? Have it all with the  all-new Yahoo! Mail Beta.

[sqlite] About Triggers

2006-08-07 Thread chetana bhargav
Hi,
   
  I have few questions regarding triggers,
   
  * If we want to have trigger for some condition and if multiple applications 
create a trigger for the same condition providing different C callback 
functions (which I guess is possible through sqlite3_create_function), will the 
trigger be fired to all the registered apps.
   
  * Is it possible to get the rowid for which the trigger is fired,


-
See the all-new, redesigned Yahoo.com.  Check it out.

Re: [sqlite] indexes

2006-04-17 Thread chetana bhargav
Thanks for the info.
   
  Cheers,
  Chetana.

Jay Sprenkle <[EMAIL PROTECTED]> wrote:
  On 4/17/06, chetana bhargav wrote:
> Am I correct in saying that once we create an index on a table what ever the 
> new records added would be done according to the index mentioned.
>
> If so, if we create an index on a table which has already some records then 
> will those records be re-arranged.

Records are not reordered or moved based on the index.
The index is like an index in a book. It tells where to find things but doesn't
change the order.



-
How low will we go? Check out Yahoo! Messenger’s low  PC-to-Phone call rates.

Re: [sqlite] indexes

2006-04-17 Thread chetana bhargav
Am I correct in saying that once we create an index on a table what ever the 
new records added would be done according to the index mentioned.
   
  If so, if we create an index on a table which has already some records then 
will those records be re-arranged.

Jay Sprenkle <[EMAIL PROTECTED]> wrote:
  On 4/17/06, chetana bhargav wrote:
> I just want to know, if we create an index on any table, how the index is 
> stored, is it stored in a seperate file or as part of the current table only 
> in the same file.

There's only one file no matter how many tables or indexes you create.



-
Love cheap thrills? Enjoy PC-to-Phone  calls to 30+ countries for just 2¢/min 
with Yahoo! Messenger with Voice.

[sqlite] indexes

2006-04-17 Thread chetana bhargav
Hi,
   
  I just want to know, if we create an index on any table, how the index is 
stored, is it stored in a seperate file or as part of the current table only in 
the same file.
   
  Cheers,
  Chetana


-
New Yahoo! Messenger with Voice. Call regular phones from your PC and save big.

[sqlite] about deletion

2006-04-07 Thread chetana bhargav
Hi,
   
  I just want to know how rows are deleted, its same like insertion where we 
create journal?
   
  -x-


-
Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ 
countries) for 2¢/min or less.

[sqlite] feild value pairs

2006-02-10 Thread chetana bhargav
Hi,
   
  My requirement is that, I want to store some common properties and some more 
optional properties depending on the need of each application. Where these 
optional properties need to be stored as feild value pairs. Most of the 
values(almost 99.5%) values are of integer type. And there are some 100 odd 
such properties
   
  Now my problem if I want to store these optional properties, do I create a 
column for each type or just store them as blob. If we store them as blob is 
there any sginificat performance impact if some one stores all the properties 
in one record as the record size grows. Presuming all properties are stored 
taking 400 bytes for each record(at max). 
   
  Do we have any analysis the enumeration time or load time if we have large 
data in one record. Or the overall impact because of couple of  large records.


-
Brings words and photos together (easily) with
 PhotoMail  - it's free and works with Yahoo! Mail.

[sqlite] aynchronous loading

2006-02-07 Thread chetana bhargav
Hi,
   
  Does sqlite provides asynchronous loading of data. Basically if I have 
something around 3000 records and want to do some query, instead of returning 
the result in one single query is it possible for me to relinquish the control 
to other apps so that I wont get a time out error. and get the data in sets.
   
  Or any other possible way to speed up the result.
   
   
  -Chetan.


-
Relax. Yahoo! Mail virus scanning helps detect nasty viruses!

[sqlite] Indexing

2006-02-07 Thread chetana bhargav
Hi,
   
  I am sure that this question would have been asked many times earlier also. I 
am new to this list, can any one point me about some info on indexing in 
SQLite. The time efficiency and space it requires. Some Do's and Dont's about 
indexing.
   
  Thanks for the help in advance.
   
   
  Cheers,
  Chetan.


-
 Yahoo! Mail - Helps protect you from nasty viruses.

[sqlite] Auto Increment?

2006-01-31 Thread chetana bhargav
Auto increment seems to return a unsigned long long is there any way for it to 
make it as 32 bit, as I am depending on this feilds to generate unique id, and 
i have a constraint fot the id to be 32 bit only. 

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com