Difference between revisions of "MetaHDBC"

From HaskellWiki
Jump to navigation Jump to search
m
(Added status and link to MetaHDBC darft paper)
Line 1: Line 1:
 
MetaHDBC is a project that will use [[Template_Haskell | Template Haskell]] and [http://software.complete.org/software/projects/show/hdbc HDBC] to do statically checked database access.
 
MetaHDBC is a project that will use [[Template_Haskell | Template Haskell]] and [http://software.complete.org/software/projects/show/hdbc HDBC] to do statically checked database access.
  +
  +
[http://lindstroem.wordpress.com/2008/09/18/metahdbc-paper-draft/ A draft paper is now available describing MetaHDBC.]
   
 
For a little background, see this [http://www.nabble.com/Using-Template-Haskell-to-make-type-safe-database-access-td17027286.html haskell-cafe post] which got the project started.
 
For a little background, see this [http://www.nabble.com/Using-Template-Haskell-to-make-type-safe-database-access-td17027286.html haskell-cafe post] which got the project started.
Line 6: Line 8:
   
 
After installation you can look at the examples directory in the repository to get started easily with MetaHDBC.
 
After installation you can look at the examples directory in the repository to get started easily with MetaHDBC.
  +
  +
= Status =
  +
  +
MetaHDBC is implemented and can be used, but it has some shortcomings.
  +
  +
First, MetaHDBC's implicit static typing is only as good as the underlying database ability to do type inference. Unfortunately, popular open source database like PostgreSQL, MySQL and SQLite do a poor job of type inference. On the other hand, if you use IBM's DB2, you are in luck as DB2's type inference is pretty good. We have not tested MS SQL server's ability to do type inference, but we suspect it is also good. If you try to use MetaHDBC with MS SQL server, then please [mailto:mads_lindstroem@yahoo.dk report the results].
  +
  +
Second, MetaHDBC have not seen much use, so bugs may be lurking that has yet to be fix.
   
 
= Tasks =
 
= Tasks =

Revision as of 14:42, 21 September 2008

MetaHDBC is a project that will use Template Haskell and HDBC to do statically checked database access.

A draft paper is now available describing MetaHDBC.

For a little background, see this haskell-cafe post which got the project started.

Installation notes for MetaHDBC.

After installation you can look at the examples directory in the repository to get started easily with MetaHDBC.

Status

MetaHDBC is implemented and can be used, but it has some shortcomings.

First, MetaHDBC's implicit static typing is only as good as the underlying database ability to do type inference. Unfortunately, popular open source database like PostgreSQL, MySQL and SQLite do a poor job of type inference. On the other hand, if you use IBM's DB2, you are in luck as DB2's type inference is pretty good. We have not tested MS SQL server's ability to do type inference, but we suspect it is also good. If you try to use MetaHDBC with MS SQL server, then please report the results.

Second, MetaHDBC have not seen much use, so bugs may be lurking that has yet to be fix.

Tasks

If you are interested in helping out with any of the following task, please contact me. If you have other tasks, that could help MetaHDBC, it would also be beneficiary to contact me before starting.

Make popular open source database do type inference

Currently, we have found no open source database which do type inference. This is unfortunately as it makes MetaHDBC a lot less valuable.

Refactoring the test cases

I (Mads Lindstrøm) are working towards refactoring the test cases, so that they will be easier to understand and be easier to run. They can be problematic to run if you do not have all of PostgreSQL, MySQL, SQLite and DB2 installed. It should be possible to run a subset of the test-cases matching the databases a user has installed.

Testing MetaHDBC on MS Windows

MetaHDBC has only been run on Linux. We would especially like to see MetaHDBC used with MS SQL server, as we expect (hope for) SQL server to have good type inference.

Removing the need to patch HDBC

To make MetaHDBC compile we need to patch HDBC. It would be better if did not need this.

The need can be removed by either making our own binding towards ODBC, or by making a patch that would be acceptable by the HDBC maintainer (John Goerzen). The latter solution would be preferable and we have made two feature request towards HDBC-ODBC, here and here. However, feature requests is one thing, working maintainable code is another. Please consider implementing the two feature requests in such a way that they could be included in the HDBC-ODBC package. You should, of cause, talk to John Goerzen before implementing these feature requests.