[sqlite] Is there any existing to open .db-wal file?

2011-07-11 Thread 박성근
I am trying to investigate .db-wal file gathered from sudden power off.

Is there any existing to open and list up all records of .db-wal file?

Or do I have to check each frame and record by myself using sqlite spec.?



Thanks and Regards,

Sung
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Storing/editing hierarchical data sets

2011-07-11 Thread J Decker
On Sun, Jul 10, 2011 at 10:52 AM, Christopher Melen
 wrote:
>
> Hi,
>
>
> I am developing an application which analyses audio data, and I have recently 
> been looking into Sqlite as a possible file format. The result of an analysis 
> in my application is a hierarchical data set, where each level in the 
> hierarchy represents a summary of the level below, taking the max of each 
> pair in the sub-level, in the following way:
>
>
>                                 251  214
>
>
>              251  54                             201  214
>
>
>   251  91                    17   54                   31  201                
>        214  66
>
>
> 251 18 5 91   11 17 54 16    9 31 201 148    173 214 43 66
>
>
> Such a structure essentially represents the same data set at different levels 
> of resolution ('zoom levels', if you like). My first experiments involved a 
> btree-like structure (actually something closer to an enfilade* or counted 
> btree**), where the data stored in each node is simply a summary of its child 
> nodes. Edits to any node at the leaf level propagate up the tree, whilst 
> large edits simply entail unlinking pointers to subtrees, thus making edits 
> on any scale generally log-like in nature. This works fine as an in-memory 
> structure, but since my data sets might potentially grow fairly large (a few 
> hundred MB at least) I need a disk-based solution. I naively assumed that I 
> might be able to utilize Sqlite's btree layer in order to implement this more 
> effectively; this doesn't seem possible, however, given that the btree layer 
> isn't directly exposed, and in any case it doesn't map onto the user 
> interface in any way that seems helpful for this task.
>

I developed an option tree that is heirarchal and is basically like a
registry.  I only store the parent_id, since order isn't entirely
important.

node_id | parent_node_id | content | sequence

maybe adding a sequence if which is to the left or right is
important but this isn't really binary treeing either

if you want what's under a thing just select who has that node_id as a
parent_node_id




>
> I am aware of some of the ways in which hierarchical or tree-like structures 
> can be represented in a database (adjacency lists, nested sets, materialized 
> paths, etc.), but none of these seems to offer a good solution. What I'm 
> experimenting with at present is the idea of entering each node of the 
> hierarchy into the database as a blob (of say, 1024 bytes), while maintaining 
> a separate in-memory tree which then maps on to this flat database of nodes 
> (each node in the tree maintains a pointer to a node in the database).
>
>
> I would be very interested in
> thoughts/observations
> on this problem - or even better a solution!
>
>
>
> Many thanks in advance,
> Christopher
>
>
> * http://en.wikipedia.org/wiki/Enfilade_(Xanadu)
> ** http://www.chiark.greenend.org.uk/~sgtatham/algorithms/cbtree.html
>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Insert not working for sqlite3

2011-07-11 Thread James_21th
Dear all,

This time the code below work perfectly!
exec("drop table if exists tbl2");
$dbh->exec("create table tbl2 (one varchar(10),two varchar(10))");
$dbh->exec("insert into tbl2 values('test1a','test2a')");
$dbh->exec("insert into tbl2 values('test1b','test2b')");
$dbh->exec("insert into tbl2 values('test1c','test2c')");
$dbh->exec("insert into tbl2 values('test1d','test2d')");
$result=$dbh->query('select * from tbl2');
foreach($result as $row)
{
print "row=".$row['one'].",".$row['two']."\n";
}
$dbh=NULL;
print "Done\n";
}
catch(PDOException $e)
{
  print "Exception: ".$e->getMessage();
}
?>



I managed to find out why yesterday's code is not working:

$result=$dbh->query("create table tbl2 (one varchar(10),two varchar(10));");

actually if I remove the "$result=", directly put as below:

$dbh->query("create table tbl2 (one varchar(10),two varchar(10));");

Then it also works.

So thank you so much everybody!

James

- Original Message 
From: "Black, Michael (IS)" 
To: General Discussion of SQLite Database 
Sent: Mon, 11 July, 2011 9:18:30 PM
Subject: Re: [sqlite] Insert not working for sqlite3

If CREATE has no return why do I get a return?



To be clear I'm using PHP 5.3.6 and it most definitely gets a return

But I re-wrote this according to some PDO examples I found.  This is a more 
complete example.



You should be able to run this with a PHP command line -- forget the web 
interface until you get this working.

If the database can't be opened you'll get an exception.

If this doesn't work then open up the database with sqlite3 and .dump it.



exec("drop table if exists tbl2");
$dbh->exec("create table tbl2 (one varchar(10),two varchar(10))");
$dbh->exec("insert into tbl2 values('test1a','test2a')");
$dbh->exec("insert into tbl2 values('test1b','test2b')");
$dbh->exec("insert into tbl2 values('test1c','test2c')");
$dbh->exec("insert into tbl2 values('test1d','test2d')");
$result=$dbh->query('select * from tbl2');
foreach($result as $row)
{
print "row=".$row['one'].",".$row['two']."\n";
}
$dbh=NULL;
print "Done\n";
}
catch(PDOException $e)
{
  print "Exception: ".$e->getMessage();
}
?>



This displays this output

D:\SQLite>php -e  enabled
SQLite3 module version => 0.7-dev
SQLite Library => 3.7.4





Michael D. Black

Senior Scientist

NG Information Systems

Advanced Analytics Directorate




From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on 
behalf of Stephan Beal [sgb...@googlemail.com]
Sent: Monday, July 11, 2011 6:10 AM
To: General Discussion of SQLite Database
Subject: EXT :Re: [sqlite] Insert not working for sqlite3

On Mon, Jul 11, 2011 at 2:41 AM, James_21th  wrote:

> $result=$dbh->query("create table tbl2 (one varchar(10),two
> varchar(10));");
>

A CREATE statement has no results. In PDO, only SELECT (and similar) return
a result, if i'm not mistaken.

--
- stephan beal
http://wanderinghorse.net/home/stephan/
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

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


Re: [sqlite] Storing/editing hierarchical data sets

2011-07-11 Thread Black, Michael (IS)
I can see adding a forward/reverse link to the tables making it a linked-list 
type structure much like your btree.

By default each node is linked to the one in front and back.  Then you adjust 
those pointers for cut/paste operations.

You could also do the cut/paste just by copying to a new table.





If you want a disk-based B-Tree try this:

http://www.die-schoens.de/prg/





Michael D. Black

Senior Scientist

NG Information Systems

Advanced Analytics Directorate




From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on 
behalf of Christopher Melen [relativef...@hotmail.co.uk]
Sent: Monday, July 11, 2011 3:28 PM
To: sqlite-users@sqlite.org
Subject: EXT :Re: [sqlite] Storing/editing hierarchical data sets


Many thanks for your neat, simple suggestion, Michael. Sometimes you can miss 
the wood for the btrees...


Using tables seems a very attractive way to maintain such a hierarchy. The 
problem is that I need to be able to operate on the structure in a way not 
limited to just updating nodes and adding new ones. What I want to implement is 
a general cut/copy/paste mechanism - which is why I investigated btree-like 
data structures in the first place. Cutting and pasting in a btree is simple, 
often being no more than a matter of reorganizing a few pointers. A tree with a 
vast number of nodes (such as a typical b+tree) can be modified in this way 
with O(logN) efficiency. And in such a hierarchical arrangement as the one I 
require, localised changes are just as cheap, simply propagating up the tree to 
the root. What I am wondering, then (leaving aside the question of hierarchy), 
is if such a  cut/copy/paste mechanism can be implemented using Sqlite tables, 
and if so how efficient is it likely to be? Might a virtual table created via 
ATTACH be useful here?



Apologies for any naive assumptions - I've studied trees a lot but not so much 
SQL!


Thanks,
Christopher

> From: michael.bla...@ngc.com
> To: sqlite-users@sqlite.org
> Date: Sun, 10 Jul 2011 19:41:07 +
> Subject: Re: [sqlite] Storing/editing hierarchical data sets
>
> Somebody smarter than I may be able to figure out how to use views to do the 
> upper levels.
>
> But if you can afford your database to be a bit less then twice as big just 
> use tables.
>
>
>
> create table level1(id int,l int,r int);
> insert into level1 values(1,251,18);
> insert into level1 values(2,5,91);
> insert into level1 values(3,11,17);
> insert into level1 values(4,54,16);
> insert into level1 values(5,9,31);
> insert into level1 values(6,201,148);
> insert into level1 values(7,173,214);
> insert into level1 values(8,43,66);
> select max(l,r) from level1;
> 251
> 91
> 17
> 54
> 31
> 201
> 214
> 66
> create table level2(id int,l int, r int);
> insert into level2(l) select max(l,r) from level1 where rowid%2=1;
> update level2 set r= (select max(l,r) from level1 where 
> level2.rowid=level1.rowid/2);
> select * from level2;
> id|l|r
> |251|91
> |17|54
> |31|201
> |214|66
> create table level3(id int,l int, r int);
> insert into level3(l) select max(l,r) from level2 where rowid%2=1;
> update level3 set r= (select max(l,r) from level2 where 
> level3.rowid=level2.rowid/2);
> select * from level3;
> id|l|r
> |251|54
> |201|214
> insert into level4(l) select max(l,r) from level3 where rowid%2=1;
> update level4 set r= (select max(l,r) from level3 where 
> level4.rowid=level3.rowid/2);
> select * from level4;
> id|l|r
> |251|214
>
>
>
> Now let's update
>
> update level1 set l=90 where id=1;
>
> update level2 set l=(select max(level1.l,level1.r) where 
> level2.rowid=level1.rowid/2)
>
> update level2 set l= (select max(l,r) from level1 where 
> level2.rowid=(level1.rowid+1)/2);
>
> select * from level2;
>
> id|l|r
> |90|91
> |17|54
> |31|201
> |214|66
>
> update level3 set l=(select max(level2.l,level2.r) from level2 where 
> level3.rowid=level2.rowid/2);
>
> update level3 set l= (select max(l,r) from level2 where 
> level3.rowid=(level2.rowid+1)/2);
>
> select * from level3;
> id|l|r
> |91|54
> |201|214
>
> update level4 set l=(select max(level3.l,level3.r) from level3 where 
> level4.rowid=level3.rowid/2);
>
> update level4 set l= (select max(l,r) from level3 where 
> level4.rowid=(level3.rowid+1)/2);
>
> select * from level4;
> id|l|r
> |91|214
>
>
>
> Michael D. Black
>
> Senior Scientist
>
> NG Information Systems
>
> Advanced Analytics Directorate
>
>
>
> 
> From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on 
> behalf of Christopher Melen [relativef...@hotmail.co.uk]
> Sent: Sunday, July 10, 2011 12:52 PM
> To: sqlite-users@sqlite.org
> Subject: EXT :[sqlite] Storing/editing hierarchical data sets
>
>
> Hi,
>
>
> I am developing an application which analyses audio data, and I have recently 
> been looking into Sqlite as a possible file format. The result of an analysis 
> in my application is a hierarchical data set, where each level in the 
> 

Re: [sqlite] Storing/editing hierarchical data sets

2011-07-11 Thread Christopher Melen

Many thanks for your neat, simple suggestion, Michael. Sometimes you can miss 
the wood for the btrees...


Using tables seems a very attractive way to maintain such a hierarchy. The 
problem is that I need to be able to operate on the structure in a way not 
limited to just updating nodes and adding new ones. What I want to implement is 
a general cut/copy/paste mechanism - which is why I investigated btree-like 
data structures in the first place. Cutting and pasting in a btree is simple, 
often being no more than a matter of reorganizing a few pointers. A tree with a 
vast number of nodes (such as a typical b+tree) can be modified in this way 
with O(logN) efficiency. And in such a hierarchical arrangement as the one I 
require, localised changes are just as cheap, simply propagating up the tree to 
the root. What I am wondering, then (leaving aside the question of hierarchy), 
is if such a  cut/copy/paste mechanism can be implemented using Sqlite tables, 
and if so how efficient is it likely to be? Might a virtual table created via 
ATTACH be useful here?



Apologies for any naive assumptions - I've studied trees a lot but not so much 
SQL!


Thanks,
Christopher

> From: michael.bla...@ngc.com
> To: sqlite-users@sqlite.org
> Date: Sun, 10 Jul 2011 19:41:07 +
> Subject: Re: [sqlite] Storing/editing hierarchical data sets
> 
> Somebody smarter than I may be able to figure out how to use views to do the 
> upper levels.
> 
> But if you can afford your database to be a bit less then twice as big just 
> use tables.
> 
> 
> 
> create table level1(id int,l int,r int);
> insert into level1 values(1,251,18);
> insert into level1 values(2,5,91);
> insert into level1 values(3,11,17);
> insert into level1 values(4,54,16);
> insert into level1 values(5,9,31);
> insert into level1 values(6,201,148);
> insert into level1 values(7,173,214);
> insert into level1 values(8,43,66);
> select max(l,r) from level1;
> 251
> 91
> 17
> 54
> 31
> 201
> 214
> 66
> create table level2(id int,l int, r int);
> insert into level2(l) select max(l,r) from level1 where rowid%2=1;
> update level2 set r= (select max(l,r) from level1 where 
> level2.rowid=level1.rowid/2);
> select * from level2;
> id|l|r
> |251|91
> |17|54
> |31|201
> |214|66
> create table level3(id int,l int, r int);
> insert into level3(l) select max(l,r) from level2 where rowid%2=1;
> update level3 set r= (select max(l,r) from level2 where 
> level3.rowid=level2.rowid/2);
> select * from level3;
> id|l|r
> |251|54
> |201|214
> insert into level4(l) select max(l,r) from level3 where rowid%2=1;
> update level4 set r= (select max(l,r) from level3 where 
> level4.rowid=level3.rowid/2);
> select * from level4;
> id|l|r
> |251|214
> 
> 
> 
> Now let's update
> 
> update level1 set l=90 where id=1;
> 
> update level2 set l=(select max(level1.l,level1.r) where 
> level2.rowid=level1.rowid/2)
> 
> update level2 set l= (select max(l,r) from level1 where 
> level2.rowid=(level1.rowid+1)/2);
> 
> select * from level2;
> 
> id|l|r
> |90|91
> |17|54
> |31|201
> |214|66
> 
> update level3 set l=(select max(level2.l,level2.r) from level2 where 
> level3.rowid=level2.rowid/2);
> 
> update level3 set l= (select max(l,r) from level2 where 
> level3.rowid=(level2.rowid+1)/2);
> 
> select * from level3;
> id|l|r
> |91|54
> |201|214
> 
> update level4 set l=(select max(level3.l,level3.r) from level3 where 
> level4.rowid=level3.rowid/2);
> 
> update level4 set l= (select max(l,r) from level3 where 
> level4.rowid=(level3.rowid+1)/2);
> 
> select * from level4;
> id|l|r
> |91|214
> 
> 
> 
> Michael D. Black
> 
> Senior Scientist
> 
> NG Information Systems
> 
> Advanced Analytics Directorate
> 
> 
> 
> 
> From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on 
> behalf of Christopher Melen [relativef...@hotmail.co.uk]
> Sent: Sunday, July 10, 2011 12:52 PM
> To: sqlite-users@sqlite.org
> Subject: EXT :[sqlite] Storing/editing hierarchical data sets
> 
> 
> Hi,
> 
> 
> I am developing an application which analyses audio data, and I have recently 
> been looking into Sqlite as a possible file format. The result of an analysis 
> in my application is a hierarchical data set, where each level in the 
> hierarchy represents a summary of the level below, taking the max of each 
> pair in the sub-level, in the following way:
> 
> 
>  251  214
> 
> 
>   251  54 201  214
> 
> 
>251  9117   54   31  201   
> 214  66
> 
> 
> 251 18 5 91   11 17 54 169 31 201 148173 214 43 66
> 
> 
> Such a structure essentially represents the same data set at different levels 
> of resolution ('zoom levels', if you like). My first experiments involved a 
> btree-like structure (actually something closer to an enfilade* or counted 
> btree**), where the data stored in each node is simply a summary of its child 
> nodes. 

Re: [sqlite] Header pointers in table callback

2011-07-11 Thread Igor Tandetnik
On 7/11/2011 11:04 AM, Prakash Reddy Bande wrote:
> We were looking at the ways we can optimize our application. Our app
> does a simple sqlite3_exec and sends the callback as below. The data
> is just a map
>
> int sqlite3TableCallback(void* data, int ncols, char** values, char** headers)
>
> {
>  map&  table = *(( map vector  >*) data);
>  for (int i = 0; i<  ncols; i++)
>  {
>if(values[i])
>  table.Data[headers[i]].push_back(string(values[i]));
>else
>  table.Data[headers[i]].push_back(string());
>  }
>  return 0;
> }
>
> Here, we wanted to optimize the string construction of string in
> table.Data[headers[i]]. We were happy to notice that the headers were
> pointing to the same address, hence we are planning to enhance the
> callback data so that it can track map, and then in
> the table.Data[headers[i]] we can pass reference to the string
> preventing its construction and destruction. Agreed, there will be
> another look-up in the map, for char* to string.

Personally, I'd build a vector, just assigning 
sequential numbers of columns. You could also build a vector 
containing column names the first time the callback is called. With 
these two in hand, it's trivial to build a map :

for (int i = 0; i < data.size(); ++i) {
   mymap[headers[i]].swap(data[i]);
}


Actually, I'd not use sqlite3_exec at all, but instead a loop based on 
sqlite3_prepare and sqlite3_step.
-- 
Igor Tandetnik

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


Re: [sqlite] Insert not working for sqlite3

2011-07-11 Thread Simon Slavin

On 11 Jul 2011, at 2:18pm, Black, Michael (IS) wrote:

> If CREATE has no return why do I get a return?

Whoever wrote that isn't familiar with SQLite's habits.  They don't know that 
most SQLite functions return a result code rather than some piece of data 
relating to the operating.

Simon.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Header pointers in table callback

2011-07-11 Thread Richard Hipp
On Mon, Jul 11, 2011 at 11:04 AM, Prakash Reddy Bande
wrote:

>
> Well, the bottom line, is it safe to assume that char** headers will be
> pointing to the same address through out the query (i.e. each time callback
> is called for a matching row).
>

We cannot positively, absolutely guarantee that this will never change,
since it is not part of the spec.  But SQLite has always worked as you
describe and we have no plans to change it.  I'd say you are reasonably safe
to make the optimization.


-- 
D. Richard Hipp
d...@sqlite.org
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Header pointers in table callback

2011-07-11 Thread Prakash Reddy Bande
Hi,

We were looking at the ways we can optimize our application. Our app does a 
simple sqlite3_exec and sends the callback as below. The data is just a 
map

int sqlite3TableCallback(void* data, int ncols, char** values, char** headers)

{
map& table = *(( map*) data);
for (int i = 0; i < ncols; i++)
{
  if(values[i])
table.Data[headers[i]].push_back(string(values[i]));
  else
table.Data[headers[i]].push_back(string());
}
return 0;
}

Here, we wanted to optimize the string construction of string in 
table.Data[headers[i]]. We were happy to notice that the headers were pointing 
to the same address, hence we are planning to enhance the callback data so that 
it can track map, and then in the table.Data[headers[i]] we can 
pass reference to the string preventing its construction and destruction. 
Agreed, there will be another look-up in the map, for char* to string.

Well, the bottom line, is it safe to assume that char** headers will be 
pointing to the same address through out the query (i.e. each time callback is 
called for a matching row).


Regards,

Prakash Bande
Altair Engg. Inc.
Troy MI
Ph: 248-614-2400 ext 489
Cell: 248-404-0292

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


Re: [sqlite] Insert not working for sqlite3

2011-07-11 Thread Black, Michael (IS)
If CREATE has no return why do I get a return?



To be clear I'm using PHP 5.3.6 and it most definitely gets a return

But I re-wrote this according to some PDO examples I found.  This is a more 
complete example.



You should be able to run this with a PHP command line -- forget the web 
interface until you get this working.

If the database can't be opened you'll get an exception.

If this doesn't work then open up the database with sqlite3 and .dump it.



exec("drop table if exists tbl2");
$dbh->exec("create table tbl2 (one varchar(10),two varchar(10))");
$dbh->exec("insert into tbl2 values('test1a','test2a')");
$dbh->exec("insert into tbl2 values('test1b','test2b')");
$dbh->exec("insert into tbl2 values('test1c','test2c')");
$dbh->exec("insert into tbl2 values('test1d','test2d')");
$result=$dbh->query('select * from tbl2');
foreach($result as $row)
{
print "row=".$row['one'].",".$row['two']."\n";
}
$dbh=NULL;
print "Done\n";
}
catch(PDOException $e)
{
  print "Exception: ".$e->getMessage();
}
?>



This displays this output

D:\SQLite>php -e  enabled
SQLite3 module version => 0.7-dev
SQLite Library => 3.7.4





Michael D. Black

Senior Scientist

NG Information Systems

Advanced Analytics Directorate




From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on 
behalf of Stephan Beal [sgb...@googlemail.com]
Sent: Monday, July 11, 2011 6:10 AM
To: General Discussion of SQLite Database
Subject: EXT :Re: [sqlite] Insert not working for sqlite3

On Mon, Jul 11, 2011 at 2:41 AM, James_21th  wrote:

> $result=$dbh->query("create table tbl2 (one varchar(10),two
> varchar(10));");
>

A CREATE statement has no results. In PDO, only SELECT (and similar) return
a result, if i'm not mistaken.

--
- stephan beal
http://wanderinghorse.net/home/stephan/
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Insert not working for sqlite3

2011-07-11 Thread Stephan Beal
On Mon, Jul 11, 2011 at 2:41 AM, James_21th  wrote:

> $result=$dbh->query("create table tbl2 (one varchar(10),two
> varchar(10));");
>

A CREATE statement has no results. In PDO, only SELECT (and similar) return
a result, if i'm not mistaken.

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Question on Shared Cache Mode

2011-07-11 Thread Simon Slavin

On 11 Jul 2011, at 7:17am, Sreekumar TP wrote:

> (1) In SQLite versio 3.5.o an above we can enable the "shared cache" mode.
> Is the shared cache shared between  two processes ?  OR  is shared only
> between the threads in the process ?

http://www.sqlite.org/sharedcache.html

Simon.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Can a sys admin control temporary file location without changing the source code?

2011-07-11 Thread H. Phil Duby
On Sat, Jul 9, 2011 at 23:22, Stephan Beal  wrote:

> On Sun, Jul 10, 2011 at 4:25 AM, Tom Browder 
> wrote:
>
> > sqlite db files and making sure that directory is writable by my web
> > server.  I make sure that the directory is not used for anything else
> > in order to help secure my web site.
> >
>
> Another tip for such uses:
>
> .htaccess:
>
>   (or however your db is named)
>Order allow,deny
>Deny from all
> 
>
> so that people who know the db is there can't fetch it over http.
>

You should be able to put the folder for the database file(s) outside of the
path available to access by url.  'above' or 'beside' the home / root
folder.  That way there is no way for someone to access it directly through
a browser.  Only code running on the server can access it.

>
> --
> - stephan beal
> http://wanderinghorse.net/home/stephan/
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Question on Shared Cache Mode

2011-07-11 Thread Sreekumar TP
Hello,

(1) In SQLite versio 3.5.o an above we can enable the "shared cache" mode.
Is the shared cache shared between  two processes ?  OR  is shared only
between the threads in the process ?
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users