Re: [sqlite] Making blob as a sqlite database.

2019-05-29 Thread Keith Medcalf

https://sqlite.org/c3ref/deserialize.html
https://sqlite.org/c3ref/serialize.html

---
The fact that there's a Highway to Hell but only a Stairway to Heaven says a 
lot about anticipated traffic volume.

>-Original Message-
>From: sqlite-users [mailto:sqlite-users-
>boun...@mailinglists.sqlite.org] On Behalf Of Mohd Radzi Ibrahim
>Sent: Tuesday, 28 May, 2019 21:23
>To: SQLite mailing list
>Subject: Re: [sqlite] Making blob as a sqlite database.
>
>Hi Don,
>I am working on sales and stock management systems where all outlets
>run on
>it's own local database. I was thinking of a solution for all outlets
>to
>backup to central server and perhaps thru web interface do some
>queries on
>the backup database. I know postgres has binary interface that allow
>read/write to blob record which is quite promising to have a vfs
>system
>that can just store database in that record.
>
>But it seems that the blob in SQLite could not do that.
>
>
>On Tue, Apr 30, 2019 at 10:44 PM Don V Nielsen
>
>wrote:
>
>> Sorry to bother, Mohd. What is your use case? I mentioned this to
>> developers around me and they are intrigued. You are storing a
>database
>> file as blob in a database? We are curious as to the application. I
>am
>> assuming the database being stored is a collection of sensor or
>event data?
>>
>> On Fri, Apr 26, 2019 at 5:48 PM Mohd Radzi Ibrahim
>
>> wrote:
>>
>> > Hi, is there a vfs that could be used to open a blob column as a
>> database?
>> >
>> >
>> > thanks.
>> >
>> > Radzi.
>> > ___
>> > sqlite-users mailing list
>> > sqlite-users@mailinglists.sqlite.org
>> > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-
>users
>> >
>> ___
>> sqlite-users mailing list
>> sqlite-users@mailinglists.sqlite.org
>> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-
>users
>>
>___
>sqlite-users mailing list
>sqlite-users@mailinglists.sqlite.org
>http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users



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


Re: [sqlite] Making blob as a sqlite database.

2019-05-28 Thread Simon Slavin
On 29 May 2019, at 4:22am, Mohd Radzi Ibrahim  wrote:

> But it seems that the blob in SQLite could not do that.

You can read/write to a BLOB as if it's a file.



You just can't address the BLOB as if it's a SQLite database.  To do that you'd 
have to write your own VFS, and I'm not sure that that would work.


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


Re: [sqlite] Making blob as a sqlite database.

2019-05-28 Thread Mohd Radzi Ibrahim
Hi Don,
I am working on sales and stock management systems where all outlets run on
it's own local database. I was thinking of a solution for all outlets to
backup to central server and perhaps thru web interface do some queries on
the backup database. I know postgres has binary interface that allow
read/write to blob record which is quite promising to have a vfs system
that can just store database in that record.

But it seems that the blob in SQLite could not do that.


On Tue, Apr 30, 2019 at 10:44 PM Don V Nielsen 
wrote:

> Sorry to bother, Mohd. What is your use case? I mentioned this to
> developers around me and they are intrigued. You are storing a database
> file as blob in a database? We are curious as to the application. I am
> assuming the database being stored is a collection of sensor or event data?
>
> On Fri, Apr 26, 2019 at 5:48 PM Mohd Radzi Ibrahim 
> wrote:
>
> > Hi, is there a vfs that could be used to open a blob column as a
> database?
> >
> >
> > thanks.
> >
> > Radzi.
> > ___
> > sqlite-users mailing list
> > sqlite-users@mailinglists.sqlite.org
> > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
> >
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Making blob as a sqlite database.

2019-04-30 Thread Don V Nielsen
Sorry to bother, Mohd. What is your use case? I mentioned this to
developers around me and they are intrigued. You are storing a database
file as blob in a database? We are curious as to the application. I am
assuming the database being stored is a collection of sensor or event data?

On Fri, Apr 26, 2019 at 5:48 PM Mohd Radzi Ibrahim 
wrote:

> Hi, is there a vfs that could be used to open a blob column as a database?
>
>
> thanks.
>
> Radzi.
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Making blob as a sqlite database.

2019-04-26 Thread Richard Hipp
On 4/26/19, Mohd Radzi Ibrahim  wrote:
> Hi, is there a vfs that could be used to open a blob column as a database?

I think you probably want the sqlite3_deserialize() interface.
https://www.sqlite.org/c3ref/deserialize.html

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


[sqlite] Making blob as a sqlite database.

2019-04-26 Thread Mohd Radzi Ibrahim
Hi, is there a vfs that could be used to open a blob column as a database?


thanks.

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