Making blob as a sqlite database.

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Making blob as a sqlite database.

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


thanks.

Radzi.
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Making blob as a sqlite database.

Richard Hipp-3
On 4/26/19, Mohd Radzi Ibrahim <[hidden email]> 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
[hidden email]
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Making blob as a sqlite database.

Don V Nielsen
In reply to this post by Mohd Radzi Ibrahim-3
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 <[hidden email]>
wrote:

> Hi, is there a vfs that could be used to open a blob column as a database?
>
>
> thanks.
>
> Radzi.
> _______________________________________________
> sqlite-users mailing list
> [hidden email]
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Making blob as a sqlite database.

Mohd Radzi Ibrahim-3
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 <[hidden email]>
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 <[hidden email]>
> wrote:
>
> > Hi, is there a vfs that could be used to open a blob column as a
> database?
> >
> >
> > thanks.
> >
> > Radzi.
> > _______________________________________________
> > sqlite-users mailing list
> > [hidden email]
> > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
> >
> _______________________________________________
> sqlite-users mailing list
> [hidden email]
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Making blob as a sqlite database.

Simon Slavin-3
On 29 May 2019, at 4:22am, Mohd Radzi Ibrahim <[hidden email]> 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.

<https://sqlite.org/c3ref/blob_open.html>

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
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Making blob as a sqlite database.

Keith Medcalf
In reply to this post by Mohd Radzi Ibrahim-3

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-
>[hidden email]] 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
><[hidden email]>
>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
><[hidden email]>
>> wrote:
>>
>> > Hi, is there a vfs that could be used to open a blob column as a
>> database?
>> >
>> >
>> > thanks.
>> >
>> > Radzi.
>> > _______________________________________________
>> > sqlite-users mailing list
>> > [hidden email]
>> > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-
>users
>> >
>> _______________________________________________
>> sqlite-users mailing list
>> [hidden email]
>> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-
>users
>>
>_______________________________________________
>sqlite-users mailing list
>[hidden email]
>http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users



_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users