[Haskell-cafe] Re: Oracle + Haskell advice?

John Goerzen jgoerzen at complete.org
Thu Aug 18 16:33:32 EDT 2005

On 2005-08-18, Brian Strand <bstrand at switchmanagement.com> wrote:
> I'm thinking about (re)writing some perl code in Haskell (for performance and 
> correctness reasons).  Has anyone done much with Oracle and Haskell?  So far 

Not Oracle specifically, but other databases, both free and proprietary.

> Before I wade in too deep, I'm wondering if anyone has done much "business 
> app" programming with Haskell (where "business app" is rather fuzzily defined 
> as database access, web UIs, interfacing with various systems over ip, etc.). 
>   Does anyone have any advice?  eg "don't go there" or "works great!" or "try 
> OCaml" :) .

I'm doing a lot of it.  There's a good deal of web and database activity
going on here.  Haskell is also my language of choice for scripting
projects, especially data transfer (thanks in part to my FTP library in
MissingH <g>)

I use HSQL for everything database-related.  HaskellDB did not work out
well.  It proved rather buggy, cumbersome, inflexible (it appeared to be
impossible to do a "SELECT" without "DISTINCT"), and poorly-scalable
(try having it scan a database with several thousand tables).

HSQL is more low-level, but I'm comfortable with that, having used
Perl's DBI and Python's DB-API before.

HSQL natively supports the common Free databases (MySQL, PostgreSQL,
SQLite, etc.)  We use PostgreSQL for everything that we can.  It's no
less speedy than MySQL when correctly tuned, and far more reliable.  It
also seems to be a heck of a lot easier to install and work with than
Oracle ;-)

One of our more important systems is in a Progress database.  They
provide their own ODBC system for Unix.  HSQL has an ODBC interface, and
it took only minor tweaking to port it from unixODBC to Progress's ODBC.
Configuration was trickier, but that was more because of poor docs from
Progress.  It is working highly reliably for us.

I would suspect that you could find Oracle drivers for either unixODBC,
or some custom ODBC system that is nearly API-compatible.  Once you have
that, you have HSQL.

You didn't mention what platform you're on, but if you're on Windows,
I'd imagine you'd have no problem making ODBC work.  Unix is slightly
more tricky, but again, I'd check out the unixODBC route.  It's included
in Debian by default, and I wouldn't be surprised if other OSs/distros
have it too.

-- John

More information about the Haskell-Cafe mailing list