Clinton
Clinton

Reputation: 23135

Can Haskell pretend to be a database, and if so, how?

I realise that this might be a silly question, but is there any way to get Haskell (or use some library with Haskell) to get it to act like an SQL database? If so, how?

Something like SQLite, but without persistence?

The idea is that I could create Haskell "tables" and Haskell "indexes" (stored in memory) and an external application could query them.

It's okay if it can't handle joins.

The reason is that an external application needs to query a database, but I'd like to keep my data in acid-state, and don't want to do the intermediate step of dumping stuff to the database all the time.

Upvotes: 1

Views: 681

Answers (2)

Dan Burton
Dan Burton

Reputation: 53675

The idea is that I could create Haskell "tables" and Haskell "indexes" (stored in memory) and an external application could query them.

Sure, no matter what programming language you use, in your application you could expose an interface (probably via sockets or the like) to construct and query data.

Upvotes: 2

Related Questions