Re: [sqlite] Quest for "scratch table" implementation in SQLite.

2017-01-06 Thread dmp
> I'm still trying to figure out a graceful way to implement > a "scratch" database table that has the following properties: > o Can be created on demand while a database connection is open. > o Can include references to other material in the database to > ensure integrity. > o Will be automatic

Re: [sqlite] Quest for "scratch table" implementation in SQLite.

2017-01-06 Thread James K. Lowden
On Thu, 5 Jan 2017 19:26:26 + "Smith, Randall" wrote: > * Can be created on demand while a database connection is open. > * Can include references to other material in the database to >ensure integrity. > * Will be automatically deleted when the database is closed. There is a convention

Re: [sqlite] Quest for "scratch table" implementation in SQLite.

2017-01-06 Thread Domingo Alvarez Duarte
Hello Simon ! Thanks for reply ! I already raised this point here before and asked people using sqlite with multi million records and they said that they use sqlite mostly as append/read only on this case. I raised one example when sqlite uses too much memory and even Richard Hipp recognize

Re: [sqlite] Quest for "scratch table" implementation in SQLite.

2017-01-06 Thread Simon Slavin
On 6 Jan 2017, at 10:10am, Domingo Alvarez Duarte wrote: > Why I want this ? > > To overcome sqlite3 limitations with one writer per database and difficulty > to manage multi million records tables spreading then in individual databases. SQLite does not have a limitation for one writer per da

Re: [sqlite] Quest for "scratch table" implementation in SQLite.

2017-01-06 Thread Domingo Alvarez Duarte
Hello ! I'm also looking for a way to achieve something similar but using attached databases, I mean: Open a local database that automatically attach other databases and have views/triggers that use/apply to the attached databases. Why I want this ? To overcome sqlite3 limitations with one

Re: [sqlite] Quest for "scratch table" implementation in SQLite.

2017-01-06 Thread Dominique Devienne
On Thu, Jan 5, 2017 at 11:40 PM, Simon Slavin wrote: > On 5 Jan 2017, at 7:26pm, Smith, Randall wrote: > > I'm still trying to figure out a graceful way to implement a "scratch" > database table that has the following properties: > > > >o Can be created on demand while a database connect

Re: [sqlite] Quest for "scratch table" implementation in SQLite.

2017-01-05 Thread Simon Slavin
On 5 Jan 2017, at 7:26pm, Smith, Randall wrote: > I'm still trying to figure out a graceful way to implement a "scratch" > database table that has the following properties: > >o Can be created on demand while a database connection is open. >o Can include references to other mat

Re: [sqlite] Quest for "scratch table" implementation in SQLite.

2017-01-05 Thread Donald Griggs
On Thu, Jan 5, 2017 at 2:26 PM, Smith, Randall wrote: > "I'm still trying to figure out a graceful way..." I may well just be missing something important, but would the following not be simple, unclunky, and not highly error-prone? 1) Before your program closes: DROP TABLE scratchy-one;

Re: [sqlite] Quest for "scratch table" implementation in SQLite.

2017-01-05 Thread David Raymond
le set pk = 3 where pk = 2; sqlite> select * from tempTable; pk 3 sqlite> delete from permTable where pk = 3; sqlite> select * from tempTable; pk NULL -Original Message- From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Smith, Randa

Re: [sqlite] Quest for "scratch table" implementation in SQLite.

2017-01-05 Thread David Raymond
te> select * from tempTable; pk NULL -Original Message- From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Smith, Randall Sent: Thursday, January 05, 2017 2:26 PM To: sqlite-users@mailinglists.sqlite.org Subject: [sqlite] Quest for "scratch ta

[sqlite] Quest for "scratch table" implementation in SQLite.

2017-01-05 Thread Smith, Randall
I'm still trying to figure out a graceful way to implement a "scratch" database table that has the following properties: o Can be created on demand while a database connection is open. o Can include references to other material in the database to ensure integrity. o Will