What's the easiest method to communicate with a database using Haskell? I am familiar with with a couple kind of ORM (Django's ORM, hibernate, etc.) then one similar could be nice when designing applications with HAppS.

Edit: Let me be free to select from Postgresql MySql and SQLite so far as the particular databases go.

The library I are thinking about isn't an ORM, however it can always do what you would like.

If you would like something which makes your database accesses safe while integrating things to your program nicely then check out HaskellDB. It essentially examines your schema, creates some data structures, after which provides you with type safe methods to query. It has been around for a long time and also the community opinion is the fact that it is good and stable.

To make use of it, you will need some underlying Haskell DB library like HSQL.

Best of luck!

Why ORM libraries exist is the fact that there's relative large distinction between Objects in C# or Java and that which you store inside a database. This isn't a lot an problem in Haskell because:

  1. It doesn't have Objects
  2. Both databases and Haskell list get their inspiration in mathematical set theory, therefore the friction together is under between databases and Objects.

I really greatly such as the approach of HAppS (HAppS-Condition) which enables you to definitely ignore studying the marshalling/unmarshalling cludge of ORM and let us you just use Haskell's data types.

Perhaps you have looked with the database mapping and access packages at http://hackage.haskell.org/packages/archive/pkg-list.html#cat:Database

I've not used them, so can't recommend that particular. I additionally have no idea what databases you're thinking about using.