On Tue, Jul 19, 2011 at 4:39 PM, Glenn McCord <glenn.mcc...@gmail.com> wrote: > On Tue, Jul 19, 2011 at 4:31 PM, Simon Slavin <slav...@bigfraud.org> wrote: >> >> On 19 Jul 2011, at 5:17am, Glenn McCord wrote: >> >>> Hi. I've been trying to find out the best way of loading an sqlite >>> database from memory. Basically I'd like to be able to save a small >>> sqlite database as meta data to an audio file, i.e. an mpeg4 >>> container. I'd then be able read, modify then write it back to the >>> file. >> >> You can use the SQLite backup API to transfer an entire database from or to >> memory: >> >> http://www.sqlite.org/backup.html >>
I've just had a quick look at the backup API, and it seems to make use of filenames and sqlite databases, which is not exactly what I'm after. What I need is the ability to read in an array of bytes, (read from meta data of an mpeg4, say, via fstream or some other equivalent), that represents the raw data of an sqlite database. I'm trying to avoid having to parse in that data, save it to a separate file first, then load it using a mysql open() call. I'll admit that I only had a quick read, so may have missed something. Thanks >> However, I'm not sure of the wisdom of saving data in this way. The SQLite >> file format is not simple or easy to inspect, and uses up a lot of space >> because it has to hold indexing information. Would it not make more sense >> to encode your data as XML or JSON and save this (or a .zipped version of >> this) in your MPEG4 instead ? >> > > I was thinking the same thing, but some of the guys around the office > are pretty keen on the idea of using sqlite. I'm just doing the > required research and weighing up the options. Using JSON seems like a > good idea. > > Thanks for the link. > >> Simon. >> _______________________________________________ >> 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