Re: [sqlite] Writing in a blob

2013-04-28 Thread Eduardo
On Fri, 26 Apr 2013 14:02:02 -0400 Roland Hughes wrote: > It actually does make sense to add chunking to sqlite. There would be > some computational overhead, but, that all depends on the chunk size and > the cache size of the database. It makes no sense to

Re: [sqlite] Writing in a blob

2013-04-26 Thread Roland Hughes
It actually does make sense to add chunking to sqlite. There would be some computational overhead, but, that all depends on the chunk size and the cache size of the database. It makes no sense to implement YAFS (Yet Another File System) inside of SQLite. While many here view SQLite only in

Re: [sqlite] Writing in a blob

2013-04-26 Thread Simon Slavin
On 26 Apr 2013, at 5:26pm, Stephen Chrzanowski wrote: > ALL THAT SAID, I doubt it'd get implemented I'm also in this category. In fact I hope it doesn't get implemented. Yes, technically it can be done. But it's the sort of thing people assign as Computer Science

Re: [sqlite] Writing in a blob

2013-04-26 Thread Richard Hipp
On Fri, Apr 26, 2013 at 12:26 PM, Stephen Chrzanowski wrote: > Streaming a chunk of data as one huge "thing" is going to be > faster in regards to writing and reading. > That depends. See http://www.sqlite.org/intern-v-extern-blob.html -- D. Richard Hipp d...@sqlite.org

Re: [sqlite] Writing in a blob

2013-04-26 Thread Stephen Chrzanowski
+0.75 to Roland for splitting the data, and another +1 for reiterating the true functionality of what LITE means. Splitting the data into chunks will help with keeping a database small as it can throw the raw data into pages that were previously marked as deleted, thereby not increasing the

Re: [sqlite] Writing in a blob

2013-04-26 Thread Paolo Bolzoni
Writing a FS as sqlite3 as backend sounds an interesting challenge. But I would like recalling everyone, that the question was about writing an arbitrary precision integer in the DB considering that the library writes the representation in a FILE*. At the end I wrote a little FILE* wrapper

Re: [sqlite] Writing in a blob

2013-04-26 Thread Roland Hughes
Speaking as an IT professional with 20+ years in the field, I would have to say adding any kind of "file system" support to SQLite would be a horrible thing. Yes, I've used Oracle. I've also used the only real product Oracle has, RDB on OpenVMS. I've written books covering MySQL, PostgreSQL,

Re: [sqlite] Writing in a blob

2013-04-25 Thread Stephen Lombardo
On Tue, Apr 23, 2013 at 6:17 PM, James K. Lowden wrote: > On Tue, 23 Apr 2013 10:28:35 -0400 > Richard Hipp wrote: > > > In summary: No, a bare SQLite blob does not provide file-system > > semantics. But you can write a wrapper library around SQLite

Re: [sqlite] Writing in a blob

2013-04-25 Thread Dimiter 'malkia' Stanev
On 4/23/2013 3:17 PM, James K. Lowden wrote: On Tue, 23 Apr 2013 10:28:35 -0400 Richard Hipp wrote: In summary: No, a bare SQLite blob does not provide file-system semantics. But you can write a wrapper library around SQLite that does provide

Re: [sqlite] Writing in a blob

2013-04-23 Thread James K. Lowden
On Tue, 23 Apr 2013 10:28:35 -0400 Richard Hipp wrote: > In summary: No, a bare SQLite blob does not provide file-system > semantics. But you can write a wrapper library around SQLite that > does provide file-system semantics for large blobs, and doing so > would have many

Re: [sqlite] Writing in a blob

2013-04-23 Thread Jay A. Kreibich
On Tue, Apr 23, 2013 at 10:28:35AM -0400, Richard Hipp scratched on the wall: > Or, if you really want file-system semantics on top of your database (and > this is a reasonably idea, actually) you could write a wrapper library that > implemented file-system semantics on top of SQLite. As a

Re: [sqlite] Writing in a blob

2013-04-23 Thread Teg
>>Imagine what could happen if, for example, git where to start using this >>library. Instead of the ".git" directory containing lots and lots of >>separate files, your repository would be a single ".git" file which was >>really an SQLite database accessed through the "sqlite3fs" wrapper. I use

Re: [sqlite] Writing in a blob

2013-04-23 Thread Stephan Beal
On Tue, Apr 23, 2013 at 4:28 PM, Richard Hipp wrote: > ...implemented file-system semantics on top of SQLite. I propose an API > something like this: > > SQLFILE *sqlite3fs_fopen(const char *zPath, const char *zMode); > For anyone wanting to take that (admittedly large)

Re: [sqlite] Writing in a blob

2013-04-23 Thread Richard Hipp
On Mon, Apr 22, 2013 at 7:39 AM, Paolo Bolzoni < paolo.bolzoni.br...@gmail.com> wrote: > I noticed that sqlite3_blob_write cannot increase the size of the pointed > open blob. So I ask, there is a way to treat a blob as a stream so I can > write > or read values in it with ease? > Short answer:

Re: [sqlite] Writing in a blob

2013-04-22 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 22/04/13 04:39, Paolo Bolzoni wrote: > But I noticed that sqlite3_blob_write cannot increase the size of the > pointed open blob. So I ask, there is a way to treat a blob as a stream > so I can write or read values in it with ease? This is

Re: [sqlite] Writing in a blob

2013-04-22 Thread Paolo Bolzoni
It won't be as easy, but I guess I need to get the size of the gmp integer before so to allocate the blob and later writing in it. On Mon, Apr 22, 2013 at 2:10 PM, Simon Slavin wrote: > > On 22 Apr 2013, at 12:39pm, Paolo Bolzoni wrote: > >> But I noticed that

Re: [sqlite] Writing in a blob

2013-04-22 Thread Simon Slavin
On 22 Apr 2013, at 12:39pm, Paolo Bolzoni wrote: > But I noticed that sqlite3_blob_write cannot increase the size of the pointed > open blob. So I ask, there is a way to treat a blob as a stream so I can write > or read values in it with ease? Unfortunately the size (length) of the BLOB is very

[sqlite] Writing in a blob

2013-04-22 Thread Paolo Bolzoni
I have a table with a column of type BLOB, and I use a library that exports or imports its data structure writing or reading from a FILE*. (see the bottom of this page: http://gmplib.org/manual/I_002fO-of-Integers.html#I_002fO-of-Integers ) So my idea was creating a FILE* wrapper around