SQLite Forum

can I insert an 8GB file into sqlite?
Login
Andrew,

I suggest you search and read the Sqlite website for SQLAR, for SQLite Archive Files.

It will very nicely store photos, etc.

The schema is:

sqlite> .schema
CREATE TABLE sqlar(
  name TEXT PRIMARY KEY,
  mode INT,
  mtime INT,
  sz INT,
  data BLOB
);

As it is an Sqlite database, you can quite happily add any extra tables you want. 

For example, a table containing the names your camera uses for stored photos together with a description you can relate to. Similar to the idea of writing on the back of paper/cardboard photos. "Grandma with grandkids", etc.

Storing stuff over 1Gb is possible, by splitting the file into smaller junks.

That is, a bit of programming required for splitting and recombining.

sqlite> select name, mode, mtime, sz from sqlar;
fred.part1|33204|1621820988|913975706
fred.part2|33204|1621822838|912242597
fred.part3|33204|1621827849|909762547
fred.part4|33204|1621832248|907433793
fred.part5|33204|1621835715|205364403


I used a similar technique in the 90s, transferring files between Melbourne (Australia) and San Ramon (California) nightly. Megabytes in those days.