Hi,
Why not just encrypt the file system or part of the disk where the database
is situated? I use TrueCrypt, a free open-source program, for this and it
works great and it's very fast. Unless you're doing hundreds of transactions
per second, you'll hardly notice the performance loss (with
On 2/23/07, Stef Mientki <[EMAIL PROTECTED]> wrote:
hello,
I've started with SQLite, because it's one of the first dbases with a
local filessytem without authenciation.
It looks great, compared to ini-files.
Now I've a basic problem:
I've a table, with 10 simple fields and 1 blob field,
Hi guys,
I am quite new here and quite new to SQLite. I am shocked how small and fast
this database is. So far I've been using MS Access for my little projects
and I cannot wait to replace it with SQLite.
Now, I have a question which I will have to deal with. One of the
application I work on
I think only the dot commands are special (.help, etc). Everything
else is fair game. Best reference for what you can feed a prepare or
exec is http://www.sqlite.org/lang.html .
-scott
On 2/23/07, Igor Tandetnik <[EMAIL PROTECTED]> wrote:
Stef Mientki <[EMAIL PROTECTED]> wrote:
> Igor
Stef Mientki <[EMAIL PROTECTED]> wrote:
Igor Tandetnik wrote:
Stef Mientki
<[EMAIL PROTECTED]>
wrote:
is there an SQL statement to get the field-names of empty tables ?
PRAGMA table_info(tableName);
I had seen that command,
but I wrote something about that these commands could only be run
Igor Tandetnik wrote:
Stef Mientki <[EMAIL PROTECTED]> wrote:
is there an SQL statement to get the field-names of empty tables ?
PRAGMA table_info(tableName);
Igor Tandetnik
Thanks Igor,
I had seen that command,
but I wrote something about that these commands could only be run from
the
> Any suggestions?
If you know that you will likely only perform per-site queries then
you want all the readings for a given site contiguous in the database
file (or files). You can accomplish that in many ways, as you've outlined.
Hopefully your reading_id's always increase as time goes
On 2/23/07, Dennis Cote <[EMAIL PROTECTED]> wrote:
P Kishor wrote:
>
>
> Most of the time I am looking at one site, so there is a speed gain by
> not plowing through other sites' data. This is what is causing me to
> pause before I rush forward.
>
If you have an index on the readings table by
Stef Mientki <[EMAIL PROTECTED]> wrote:
is there an SQL statement to get the field-names of empty tables ?
PRAGMA table_info(tableName);
Igor Tandetnik
-
To unsubscribe, send email to [EMAIL PROTECTED]
is there an SQL statement to get the field-names of empty tables ?
thanks,
Stef Mientki
-
To unsubscribe, send email to [EMAIL PROTECTED]
-
P Kishor wrote:
Most of the time I am looking at one site, so there is a speed gain by
not plowing through other sites' data. This is what is causing me to
pause before I rush forward.
If you have an index on the readings table by site_id (and perhaps
timestamp) sqlite will use the index to
On 2/23/07, Rich Shepard <[EMAIL PROTECTED]> wrote:
On Fri, 23 Feb 2007, P Kishor wrote:
..
> all is fine with this. However, there really is no relationship
> between one site and another.
You don't tell us the purpose of this exercise, but you might want to
query for all sites that
On Fri, 23 Feb 2007, P Kishor wrote:
I want to store quite a bit of data about similar but different things...
in this case, timestamped discharge and precipitation values from
different sites. A simple schema would be
CREATE TABLE sites (
site_id INTEGER PRIMARY KEY,
lon
If you have a limited need to create consolidated reports use separate
DBs. Access will be faster because at best it is Onlog(n). The rows
you don't access will slow it down, particularly if you are performing
table scans such as with LIKE selections.
You could make each DB the same name
I want to store quite a bit of data about similar but different
things... in this case, timestamped discharge and precipitation values
from different sites. A simple schema would be
CREATE TABLE sites (
site_id INTEGER PRIMARY KEY,
lon REAL,
lat REAL,
How about using one table -
- Name TEXT
- Birthdate REAL
- Mimetype TEXT
- Image BLOB
The mimetype column tells you the image type (jpeg etc).
One access would be SELECT Name Birthdate Mimetype FROM Yourtab. It
would not access the BLOB.
Stef Mientki wrote:
Cesar Rodas
This is a design question really so here are my recomendations.
Persons
- ID( an integer primary key )
- Name
- Birthday
- Picture Type ( your two digit type).
Picture
- ID (An integer Primary Key that matches the ID of persons).
- image (blob)
Cesar Rodas wrote:
Save into a blob.
thanks but that's not what I meant.
I'll try to explain with an example:
I want to create this database
Persons
- Name
- Birthday
- Picture
Now when I want to view this database with a general database browser /
manager,
I'll first find out what
Save into a blob.
here is a C example http://www.sqlite.org/cvstrac/wiki?p=BlobExample
On 23/02/07, Stef Mientki <[EMAIL PROTECTED]> wrote:
hello,
I've started with SQLite, because it's one of the first dbases with a
local filessytem without authenciation.
It looks great, compared to
Hello Cesar,
Friday, February 23, 2007, 11:19:23 AM, you wrote:
CR> good idea!! i didn't think in this!!
CR> On 23/02/07, Martin Jenkins <[EMAIL PROTECTED]> wrote:
>> Cesar Rodas wrote:
>> >while ( (n=fread(buff,Buffsize,1,file)) > 0)
>> >{
>> >if (i>0)
>> >*value =
hello,
I've started with SQLite, because it's one of the first dbases with a
local filessytem without authenciation.
It looks great, compared to ini-files.
Now I've a basic problem:
I've a table, with 10 simple fields and 1 blob field, containing a
(possibly large) image.
Uptill now the
good idea!! i didn't think in this!!
On 23/02/07, Martin Jenkins <[EMAIL PROTECTED]> wrote:
Cesar Rodas wrote:
>while ( (n=fread(buff,Buffsize,1,file)) > 0)
>{
>if (i>0)
>*value = realloc(*value, (i+1) * Buffsize);
>memcpy(*value + (i * Buffsize), buff,
I would make your routine more like this. It avoids the needless buffer
shadowing you get by using fopen and also avoids unecessary mallocs.
I haven't tested the code, it just presents the method.
unsigned char *bp;
int fd;
long fsize;
fd = open(path, O_RDWR);
Cesar Rodas wrote:
while ( (n=fread(buff,Buffsize,1,file)) > 0)
{
if (i>0)
*value = realloc(*value, (i+1) * Buffsize);
memcpy(*value + (i * Buffsize), buff, Buffsize);
*len += n;
i++;
}
An afterthought, why don't you just stat the file and
Sorry I copy bad
when I wanted to write "#define uchar unsigned char" but I did
"#define uchar unsigned char *"
On 23/02/07, Martin Jenkins <[EMAIL PROTECTED]> wrote:
Cesar Rodas wrote:
> #define uchar unsigned char *
suggests it's a char but is in fact a pointer to a char so the signature
I found the answer!! http://www.sqlite.org/cvstrac/wiki?p=BlobExample
thanks for you help too Wesley
On 23/02/07, Cesar Rodas <[EMAIL PROTECTED]> wrote:
#define E_IO_COULDNT_OPEN - 1
#define E_IO_ERRO -2
#define uchar unsigned char *
int LoadFileContent(uchar *path, uchar ** value, long *
It would be better to make the create permission 0666. Then umask can
restrict that permission and the user can get whatever permission
required by the application.
Joe Wilson wrote:
--- "Shan, Zhe (Jay)" <[EMAIL PROTECTED]> wrote:
I've tried umask, but it does not work for SQLite.
Here
Joe Wilson wrote:
I can never remember the umask number's effect without
experimentation
DESCRIPTION
umask sets the umask to mask & 0777.
The umask is used by open(2) to set initial file permissions on a
newly-created file. Specifically, permissions in the umask are turned
off from
Cesar Rodas wrote:
> #define uchar unsigned char *
suggests it's a char but is in fact a pointer to a char so the signature
of LoadFileContent is actually
int LoadFileContent(unsigned char **path, unsigned char ***value, ...
and that triggers my "three levels of indirection is usually an
A couple of comments.
On Feb 23, 2007, at 3:03 PM, Cesar Rodas wrote:
while ( (n=fread(buff,Buffsize,1,file)) > 0)
{
if (i>0)
*value = realloc(*value, (i+1) * Buffsize);
memcpy(*value + (i * Buffsize), buff, Buffsize);
*len += n;
i++;
}
You are
--- "Shan, Zhe (Jay)" <[EMAIL PROTECTED]> wrote:
> I've tried umask, but it does not work for SQLite.
Here are the default permissions used with open()'s O_CREAT flag:
src/os_os2.h:# define SQLITE_DEFAULT_FILE_PERMISSIONS 0600
src/os_unix.c:# define SQLITE_DEFAULT_FILE_PERMISSIONS 0644
But
#define E_IO_COULDNT_OPEN - 1
#define E_IO_ERRO -2
#define uchar unsigned char *
int LoadFileContent(uchar *path, uchar ** value, long * len)
{
#define Buffsize 1024*4
int n;
long i=0;
FILE *file;
unsigned char buff[Buffsize];
if ( (file=fopen(path,"rb"))==0)
{
Does any one has a C code to save a binary file into a blob, and wants
to share?
Because i am getting an "segmentation fault" error from a file that I
load into memory then I generate the query with a sqlite3_mprintf..
Thanks to all
--
Cesar Rodas
http://www.sf.net/projects/pagerank (The
>> > So make the wiki available for download. ;)
>>
>> I would like this too. ;)
>>
>> Often I'm working without an internet connection and a having a local
>> copy of the Wiki would be extremely useful.
>>
>
>Been working on this for years. Literally. I just never seem to
>find the time to
34 matches
Mail list logo