[sqlite] Appropriate Uses For SQLite

2015-02-19 Thread Olivier
Hello all, https://www.sqlite.org/whentouse.html : "The amount of web traffic that SQLite can handle depends on how heavily the website uses its database. Generally speaking, any site that gets fewer than 100K hits/day should work fine with SQLite. The 100K hits/day figure is a conservative

[sqlite] Appropriate Uses For SQLite

2015-02-19 Thread Simon Slavin
On 19 Feb 2015, at 7:31am, Olivier quoted: > it would be interesting to put *all* sqlite.org pages in the database, even > if it is useless. This would test with 500K HTTP requests per day. It will > then be possible to modify this paragraph and indicate that Sqlite smoothly > manages the

[sqlite] Complex insert query to normalised database

2015-02-19 Thread Flakheart
Here is something I don't understand. From my reading of foreign keys, it points to the unique id of the table record that it references right? If I insert a recipe with a specific category and then a different recipe that uses the same category, how then does this foreign key work without

[sqlite] Appropriate Uses For SQLite

2015-02-19 Thread Olivier
> Simon Slavin > 19 f?vrier 2015 08:54 > > It may be a note in whentouse.html should distinguish between > situations where the database is frequently written-to and situations > where you have data which is rarely changed. The lack of writes means > that a

[sqlite] Complex insert query to normalised database

2015-02-19 Thread gunnar
You should make the relation the other way around. Remove the foreign key from category and add to recipe_data a field recipe_category_id and add also to the recipe_data table a foreign key FOREIGN KEY(recipe_category_id) REFERENCES category(category_id) Then you have defined a 1 to many

[sqlite] Complex insert query to normalised database

2015-02-19 Thread gunnar
(And if you go for the one to many in between table, then you shouldn't add the recipe_category_id field to recipe-data and also not the foreign key). An alternative is when you say that one recipe_data can belong to at most, say, 5 categories. Then you can do without the extra table and add

[sqlite] Complex insert query to normalised database

2015-02-19 Thread Simon Slavin
> On 19 Feb 2015, at 8:26am, Flakheart wrote: > > If I insert a recipe with a specific category and then a different recipe > that uses the same category, how then does this foreign key work without > storing duplicate categories in the category table? > > Then later on, I need a recipe to be

[sqlite] Complex insert query to normalised database

2015-02-19 Thread Simon Slavin
Sorry, I accidentally included 'INTEGER' before 'REFERENCES'. Should have been CREATE TABLE category( category_id INTEGER PRIMARY KEY AUTOINCREMENT, category_name TEXT ); CREATE TABLE recipes_in_categories( r_i_c_idINTEGER PRIMARY KEY AUTOINCREMENT,

[sqlite] Complex insert query to normalised database

2015-02-19 Thread Flakheart
"FOREIGN KEY(recipe_category_id) REFERENCES category(category_id)" Thank you gunnar. I don't understand it yet but will work hard at it. Once I make up some dummy data to play with, it might get me a better idea of how all this works. One thing I have no lack of is recipes! My ambition is to

[sqlite] Complex insert query to normalised database

2015-02-19 Thread Flakheart
"I'm going to try to guess the conventions and style you're using but please excuse me if I get it wrong." I would not dare to criticise what I do not understand. I am incredibly grateful! Lots of study to do. Not that I sleep much any more:):) -- View this message in context:

[sqlite] Appropriate Uses For SQLite

2015-02-19 Thread Eric Grange
> https://www.sqlite.org/whentouse.html : I am currently relying on SQLite as main database engine for blockchain explorers, that's usually between 1 and 2 millions http queries per day, pretty much all of them hitting more than 60 GB of SQLite databases. There is a mix of simple table queries,

[sqlite] Appropriate Uses For SQLite

2015-02-19 Thread Jonathan Moules
Hi Richard, How about mentioning extensions as a whole? I can't seem to find a list of SQLite extensions on sqlite.org, but it seems like it'd be useful information, and not just for those deciding on whether the language is right for them. (When I use the word "extensions", I'm referring to

[sqlite] Appropriate Uses For SQLite

2015-02-19 Thread Lindsay Lawrence
I have found SQLite is uniquely suited to server-based applications of all kinds. Wrapped in a simple custom server it is an outstandingly performant ultra-lightweight engine that can easily service multiple clients. The ability to spin up multiple instances of the library against the same file is

[sqlite] Appropriate Uses For SQLite

2015-02-19 Thread Hick Gunter
We are using SQLite as the catch-all data access method (via custom extensions) for - Oracle tables and views - Faircom CTree files - Shared memory record stores ("Data Dictionary") - Log file access - Blob to record translation (TLV structures) - Partitioned data stores (CTree and Data

[sqlite] Appropriate Uses For SQLite

2015-02-19 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/18/2015 01:28 PM, Jay Kreibich wrote: > SQLite kind of already does this, if you consider VDBE instructions > to be an IR. There is a lot that would have to be done with it: - - make the IR stable across releases - - add more general

[sqlite] Appropriate Uses For SQLite

2015-02-19 Thread Stephen Chrzanowski
Dr Hipp; If you're doing a PR stunt, you should take a lot of these emails and put them on a "What users say" page and link them to the email thread (If it is accessible by the public -- I get this list in my email). That way you'd get real comments about the stability of SQLite against real

[sqlite] Appropriate Uses For SQLite

2015-02-19 Thread Richard Hipp
On 2/19/15, Roger Binns wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 02/18/2015 01:28 PM, Jay Kreibich wrote: >> SQLite kind of already does this, if you consider VDBE instructions >> to be an IR. > > There is a lot that would have to be done with it: > > - - make the IR stable

[sqlite] Appropriate Uses For SQLite

2015-02-19 Thread Gabor Grothendieck
On Wed, Feb 18, 2015 at 9:53 AM, Richard Hipp wrote: > On 2/18/15, Jim Callahan wrote: >> I would mention the open source statistical language R in the "data >> analysis" section. > > I've heard of R but never tried to use it myself. Is an SQLite > interface built into R, sure enough? Or is

[sqlite] Appropriate Uses For SQLite

2015-02-19 Thread Eduardo Morras
On Thu, 19 Feb 2015 08:31:13 +0100 Olivier wrote: > Hello all, > > https://www.sqlite.org/whentouse.html : > "The amount of web traffic that SQLite can handle depends on how > heavily the website uses its database. Generally speaking, any site > that gets fewer than 100K hits/day should work

[sqlite] Appropriate Uses For SQLite

2015-02-19 Thread Jim Callahan
Strongly agree with using the R package Sqldf. I used both RSQLite and Sqldf, both worked extremely well (and I am both a lazy and picky end user). Sqldf had the advantage that it took you all the way to your destination the workhorse R object the data frame (R can define new objects, but the data

[sqlite] 0 bytes in -wal file indicates successful checkpoint?

2015-02-19 Thread Jerry Krinock
Assertion: If the size of the -wal file is 0 bytes, then this means that the associated database has been checkpointed and, if I am sure that no process has the database open, I can safely discard the -shm and -wal files, and pass only the main database file, to another user say, with no fear

[sqlite] 0 bytes in -wal file indicates successful checkpoint?

2015-02-19 Thread Richard Hipp
On 2/19/15, Jerry Krinock wrote: > Assertion: If the size of the -wal file is 0 bytes, then this means that > the associated database has been checkpointed and, if I am sure that no > process has the database open, I can safely discard the -shm and -wal files, > and pass only the main database

[sqlite] Getting the current value of busy_timeout

2015-02-19 Thread Donald Shepherd
Is there a way to get (not set) the current value of busy_timeout when using an SQLite version older than 3.7.15 and the addition of "PRAGMA busy_timeout;"? http://www.sqlite.org/releaselog/3_7_15.html

[sqlite] Getting the current value of busy_timeout

2015-02-19 Thread Richard Hipp
On 2/19/15, Donald Shepherd wrote: > Is there a way to get (not set) the current value of busy_timeout when > using an SQLite version older than 3.7.15 and the addition of "PRAGMA > busy_timeout;"? > You can add a hack to the code. But other than that, no. -- D. Richard Hipp drh at sqlite.org

[sqlite] Getting the current value of busy_timeout

2015-02-19 Thread Richard Hipp
On 2/19/15, Simon Slavin wrote: > > On 20 Feb 2015, at 12:08am, Richard Hipp wrote: > >> You can add a hack to the code. But other than that, no. > > Given that so many PRAGMAs have a way to find out the current setting, could > this be added without too much extra code ? It has already been

[sqlite] bug report: SELECT fails with BUSY in WAL mode database with concurrent writer

2015-02-19 Thread Joey Hess
ubbed... Name: signature.asc Type: application/pgp-signature Size: 811 bytes Desc: Digital signature URL: <http://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-users/attachments/20150219/8a937849/attachment.pgp>