BLOBs in SQL

Discussion of Common Lisp

BLOBs in SQL

Postby schoppenhauer » Sun May 05, 2013 4:56 pm

Hello.

I would like to use some database for caching preprocessed data for a website. Even though the data will seldom be larger than a few megabytes, I do not feel good about having to load them into memory on the whole instead of serving them. I can (and will) of course use plain files if necessary, but having a database taking care of the dirty stuff (transactions, locks, integrity, etc.) is probably more convenient. Postgres has a blob-api - http://www.postgresql.org/docs/current/ ... faces.html - but it seems that Postmodern does not have such a thing. Maybe it is possible to use libpg via FFI, and postmodern, simultaneously? Or maybe there is another Database (MySQL, SQLite, tokyocab, etc.) that can do exactly this?

Best regards.
Sorry for my bad english.
Visit my blog http://blog.uxul.de/
schoppenhauer
 
Posts: 99
Joined: Sat Jul 26, 2008 2:30 pm
Location: Germany

Re: BLOBs in SQL

Postby pjstirling » Mon May 06, 2013 9:05 am

http://common-lisp.net/project/cl-sqlite/ does blobs when provided with byte vectors.
pjstirling
 
Posts: 63
Joined: Sun Nov 28, 2010 4:21 pm

Re: BLOBs in SQL

Postby schoppenhauer » Mon May 06, 2013 10:38 am

pjstirling wrote:http://common-lisp.net/project/cl-sqlite/ does blobs when provided with byte vectors.

But that does not prevent me from having to load the whole data into RAM first, which I want to avoid.

I am currently considering using postgres byte-arrays and substr.
Sorry for my bad english.
Visit my blog http://blog.uxul.de/
schoppenhauer
 
Posts: 99
Joined: Sat Jul 26, 2008 2:30 pm
Location: Germany


Return to Common Lisp

Who is online

Users browsing this forum: No registered users and 2 guests