[Haskell-cafe] database access recommendation

Bulat Ziganshin bulat.ziganshin at gmail.com
Thu Apr 27 14:19:29 EDT 2006


Hello Brock,

Thursday, April 27, 2006, 7:45:16 PM, you wrote:
> I looked at http://www.haskell.org/haskellwiki/Libraries_and_tools, and

suffice it to say that this page don't reflects current state of the
art. during many years it was not updated and when it was moved to the
wiki half-year ago it's contents remains the stone-age

better sources of information are HCAR ("Haskell Communities and Activities Report",
http://www.haskell.org/communities/11-2005/html/report.html) and HWN
(Haskell Weekly News, http://haskell.org/haskellwiki/HWN)

as one person said, "There are three active database libraries: HDBC,
HSQL and Takusen.". i've included here last announces on two of them
(just searched my mail archives for "SQL"):



I'm pleased to (at long last) announce the release of HDBC version
0.99.2, along with 0.99.2 versions of all database backends.  If
things go well, after a few weeks of testing, this version will become
HDBC 1.0.0.

HDBC is a multi-database interface system for Haskell -- more on it
below.

Since 0.99.0, several major things have been updated or enhanced:

 * Complete rework of memory management system.

 * Standardized memory management system for all database backends.

 * Support for querying metadata (type, size, etc.) about columns
   both in result sets and in database tables

 * Support for querying the level of transaction support in the
   underlying DB

 * ODBC driver has support for working with databases such as
   MySQL that don't support transactions

 * Testsuite enhancements for all the above

I believe that these modifications will make HDBC suitable as a
full-fledged backend for HaskellDB.

HDBC is available from:

  http://quux.org/devel/hdbc
  gopher://quux.org/1/devel/hdbc

Version 0.99.2 has also been uploaded to Debian unstable.

Features of HDBC
----------------

    *  Ability to use replacable parameters to let one query be
       executed multiple times (eliminates the need for an escape
       function)
    * Ability to access returned rows by column number
    * Ability to read data from the SQL server on-demand rather than
       reading the entire result set up front
    * HUnit testsuite for each backend driver
    * Well-defined standard API and easy backend driver implementation
    * Lazy reading of the entire result set (think hGetContents, but
       for the results of SELECT) (see sFetchAllRows)
    * Support for translation between Haskell and SQL types
    * Support for querying database server properties
    * Add-on package (hdbc-missingh) to integrate with MissingH,
       providing a database backend for AnyDBM.
    * Support for querying metadata such as column names. 

In addition, there is extensive documentation for HDBC.

Backend drivers exist for Sqlite v3, PostgreSQL, and ODBC.  MySQL is
supported via the ODBC driver and the ODBC testsuite passes against
MySQL (saving the transaction tests, which aren't supported by MySQL).
In addition, there is a odbc-missingh package that can turn and HDBC
database into an AnyDBM backend for MissingH.  (Sqlite3 could be very
handy there)

Darcs repositories are available for all of this at
http://darcs.complete.org/






I am pleased to announce the HSQL library version 1.6. The HSQL is a
simple library, which provides interface to multiple databases. MySQL,
PostgreSQL, ODBC, SQLite and MSI (new) are currently supported.
 
 
What is new? 
~~~~~~~~~~
 
1. HSQL is fully Cabalized.

2. Windows users don't need to have cygwin in order to build HSQL. The
old build system was using ./configure script which is replaced with
hooks in ./Setup.lhs script.

3. HSQL is split into multiple Cabal packages. There is one common
package 'hsql' and multiple database specific packages: hsql-odbc,
hsql-postgresql, hsql-mysql, hsql-sqlite, hsql-sqlite3, hsql-msi

4. There are two new database frontends: SQLite3 and MSI. The SQLite3
frontend is for SQLite version 3.0 and above. The old SQLite frontend
still exists. MSI is fontend to Microsoft Installer database. Each
.msi package is a relational database which you can query and modify
using HSQL.



[Haskell] ANNOUNCE: HSQL 1.7 released

What is new?
~~~~~~~~~~

1. Driver for Oracle

2. getFieldValueMB is deprecated. Now there is the instance declaration:

instance SqlBind a => SqlBind (Maybe a)

It allows to use getFieldValue instead of getFieldValueMB.
Thanks to Frederik Eaton for this idea.

3. Database.HSQL.SQLite is renamed to Database.HSQL.SQLite2. The trouble
was that with Hugs for each module with FFI is generated an extra .dll/.so
library. In this case the library is SQLite.dll which on Windows overlaps
with the name of the real sqlite.dll library.

Home page
~~~~~~~~~

http://htoolkit.sourceforge.net

Download from
~~~~~~~~~~~~~

https://sourceforge.net/project/showfiles.php?group_id=65248&package_id=93958

-- 
Best regards,
 Bulat                            mailto:Bulat.Ziganshin at gmail.com



More information about the Haskell-Cafe mailing list