> Le 18 mars 2018 à 11:31, Richard Hipp <[email protected]> a écrit : > >> What are use cases for these sqlite3_serialize / deserialize? >> I understand what they do, from the documentation. >> Though I'd like to understand what typically they were introduced for? >> (Always trying to learn something here). :) > > These APIs support the concept of using small databases (small enough > to fit in memory) as a container for passing information around. > > ... > Advantages of using an SQLite database as a container: > > (1) It is easy to mix text and binary data without having to worry > with encodings. > > (2) Applications can be easily enhanced and extended in > backwards-compatible ways by adding new columns and/or tables. > > (3) Easy to manually view or modify the container content during > testing and debugging. (JSON also has this property, but JSON does not > work with binary data.) > > (4) No need to write encoder/decoder logic. > > (5) There is a high-level query language available to extract the > content in an order that might be very different from the order it > appears in the file. > > (6) No need to worry with big-endian vs. little-endian translation, > nor UTF8 vs UTF16. The database handles that automatically.
Clever concept. I'll get code and play with it, but even before that, one question burns my mind: what about page size? Is the serialized format quite compact, or full of void unused space on 'pages'? (that obviously a good external compression would get rid of). Or said differently, how far or close is the serialized format to the on-disk SQLite file format? Thanks, -- Best Regards, Meilleures salutations, Met vriendelijke groeten, Olivier Mascia _______________________________________________ sqlite-users mailing list [email protected] http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

