I'm C# developer and I'm learning Haskell right now. I want to rewrite one of my projects in Haskell just for fun. In this project I have some work to do with MySQL so I want to ask: what is the best tool to use MySQL in Haskell. Also it will be awesome to look at some code how can I use it (I have Windows 7).
There are plenty of different bindings and libraries for interaction with databases in Haskell, most of them are described on the Haskell wiki.
If you're looking for a relatively simple binding to MySQL, then I'd recommend you have a look at either of the following:
There's a good chapter on how to use the HDBC interface in the Using Databases chapter of the Real World Haskell book, which should be enough to get you started: there are plenty of examples of code there.
Also if you are interested in a more high-level library, take a look at HaskellDB. I also wrote a tutorial on how to set it up in here. And also chrisdones' HaskellDB: A long tutorial is a good resource.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With