I wonder how flexible is the SQLite binary format to allow to design a tool that would take a SELF binary/db and rewrite it to make BLOB values more mmap-able (OS page aligned) in order to allow shortcuts in the self-exec loader.
You'd have to at least increase the page size to allow 4kB of consecutive data without interfering with the page header. OR you restructure the code and data to work around the page headers.
Executable Is a SQLite Database
61–70 of 116 posts
Re: Executable Is a SQLite Database
#62I can buy that an object file can be viewed as a relational db. Why SQLite though? Why not SQL query engine over the object file using a virtual table abstraction? I’m not seeing how most the SQLite features, with the exception of a subset of the query engine would translate over. If the author wants to make a case for including schema metadata in an object file, again why SQLite? This strikes me a lot as someone who…
Re: Executable Is a SQLite Database
#63Re: Executable Is a SQLite Database
#64Whats worked for others?
Re: Executable Is a SQLite Database
#65Yeah, I have been amazed for an entire life how many tools the IT industry invented during last 50 years to just disguise a database. OK, in '70s, '80s or '90s when compute and storage resources were limited and every bit counted, specialized formats did make sense. But nowadays we'd save enormous efforts by just packaging stuff in SQLite databases. Microsoft's proprietary file formats (Office, Power BI etc.), OpenOf…
At first I thought it was still for a word document to be saved in SQL but then I thought about embedded images and it makes complete sense. Makes more sense for a Publisher/Impress app though as they have more self-contained objects. In Word/Writer the main text is one huge run of characters, how would you sqlize that effectively?
Re: Executable Is a SQLite Database
#66Earlier quoted context omitted.
You can do any of this in-memory wife ELF of course, it's just that nobody does and nobody's written the tools for it (the most obscure tool I know of is `ld -r`, which links two or more .o files and produces a new .o file instead of an executable)
For sure, the main advantage is that since the SQLite file format is easy to use compared to ELF, it's more likely that such experiments would be even tried at all. I got another one: bundling multiple (completely separate) executables with shared dependencies in the same SQLite, selected by argv[0] when called, like what busybox does
Re: Executable Is a SQLite Database
#67Re: Executable Is a SQLite Database
#68> I realized something that bugged me. ELF is already a database. Even more broadly applied: Every base of data is already a database (that's what the compound word means). Programs like sqlite and postgres used to be called by the more precise term "Relational Data Base Management Software" or "RDBMS" until their use became so widespread that they were colloquially called databases instead. The very first data base…
Re: Executable Is a SQLite Database
#69> I realized something that bugged me. ELF is already a database. Even more broadly applied: Every base of data is already a database (that's what the compound word means). Programs like sqlite and postgres used to be called by the more precise term "Relational Data Base Management Software" or "RDBMS" until their use became so widespread that they were colloquially called databases instead. The very first data base…