in-memory db? gadfly?

C

chris

I'm looking for a completely in-memory sql db. I have seen gadfly, but
its startup method seems to require a directory for the on-disk file
storage. I have a script and I want to create a database/tables in the
script, insert some data (not much), and execute some queries, all
in-memory. Don't need to persist anything. Possible, or am I just
talking crazy here?

Thanks,
Chris
 
P

Peter Hansen

chris said:
I'm looking for a completely in-memory sql db. I have seen gadfly, but
its startup method seems to require a directory for the on-disk file
storage. I have a script and I want to create a database/tables in the
script, insert some data (not much), and execute some queries, all
in-memory. Don't need to persist anything. Possible, or am I just
talking crazy here?

I believe SQLite will do this easily, if you use a connection name of
":memory:" instead of a file name.

Wrapped with either of:

- Gerhard Häring's pysqlite (http://initd.org/tracker/pysqlite)

- Roger Binns' APSW (http://www.rogerbinns.com/apsw.html)

I believe the primary distinction is that pysqlite is DB-API 2.0
compliant, while APSW is a "thin" wrapper that may or may not feel more
comfortable for you, and which provides access to more of SQLite's
features.

(Both appear to have been around roughly the same length of time, though
pysqlite seems better known.)

-Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,078
Latest member
MakersCBDBlood

Latest Threads

Top