[sqlite] FOR NEWBIES: SQLite Database Design

2010-05-30 Thread Jay Godse
For those of you  just getting started with designing applications that use
SQLite, I have put together a YouTube channel that shows how to use SQL with
SQLite. The channel is at:

http://www.youtube.com/view_play_list?p=463DF6FFEF8D05FA


Enjoy.


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


[sqlite] FOR NEWBIES: SQLite Programming

2010-05-30 Thread Jay Godse
For those of you just getting started with programming with SQLite,  I have
put together a YouTube playlist of videos showing how to program with the
SQLite database in various programming languages.

http://www.youtube.com/view_play_list?p=AA9B7C174493EC68



Enjoy.

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


[sqlite] Question: Insert trigger to make an insert conditional

2005-10-14 Thread Jay Godse
Hi.

I would like to put an insert trigger on a table A before the
insert where the insert only happens if the values in the new
row meet certain conditions. 

I can achieve the same result by having the trigger run after
the insert on Table A and delete the newly inserted row if the
row does not match the conditions. 

Also, if I call this "insert" statement from C, and the delete
trigger runs, do I get a message from the API that the row was
not inserted?


Curiously,   Jay Godse


Re: [sqlite] Question about in memory db's

2004-03-13 Thread Jay Godse
Wow! This is quite cool. Of course, it prompts another question or two:

Instead of attaching the database to a file, is it possible to attach to a
TCP socket?

If so, then if there are two instances of SQLite running in-memory databases
(with identical schema) in two separate processes (same or different
computers), is there already a similar method to copy the databases from one
process to another (either by a pull model or a push model)? Or does one
have to set up the plumbing and the handshaking first?

If this is possible, then it may be possible to get some form of
"high-availability" with a dozen lines of SQLite code. THAT appeals to my
desire for simplicity (and perhaps to my laziness).


Curiously,   Jay Godse

- Original Message - 
From: "D. Richard Hipp" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, March 12, 2004 7:37 PM
Subject: Re: [sqlite] Question about in memory db's


> Keith Herold wrote:
>  > Is there a fast way to dump the in-memory db to disk, *and*
periodically
>  > reload the file into an in-memory db?
>  >
>
> The ATTACH command can be used for this.
>
> Suppose you do an sqlite_open() on the in-memory database
> and you want to transfer the complete contents of an
> in-memory table XYZ to an on-disk database named "abc.db"
> You can do something like this:
>
> ATTACH 'abc.db' AS external;
> BEGIN;
> DELETE FROM external.xyz;
> INSERT INTO external.xyz SELECT * FROM xyz;
> COMMIT;
> DETACH external;
>
> The same technique works in reverse to load an in-memory
> table from disk:
>
> ATTACH 'abc.db' AS external;
> BEGIN;
> DELETE FROM xyz;
> INSERT INTO xyz SELECT * FROM external.xyz;
> COMMIT;
> DETACH external;
>
> Use WHERE clauses creatively if you only want to transfer
> part of the data.
>
> Note that it is not necessary to ATTACH and DETACH every
> time you want to do this.  If you are always using the
> same external database file, you can just ATTACH it once
> when you open the in-memory database and it will always
> be there for you.
>
> -- 
> D. Richard Hipp -- [EMAIL PROTECTED] -- 704.948.4565
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]