From: Bjorn B. <d00...@dt...> - 2005-04-13 10:18:13
|
Frederik Eaton wrote: > I'm thinking about implementing special indexing data structures over > SQL tables in databases that might not support those structures > natively, for instance an R-tree for multidimensional range queries (I > think mysql supports only up to dimension 2) or a simple balanced tree > for fast calculation of a running total of a given column. (data > structure links would be to primary key columns of tables) Thiat sounds like an interesting project. > I thought that haskelldb might be a good candidate for such an > implementation because of the ability to achieve modularity by > composing query functions, and also the potential to minimize context > switches by sending large chunks of SQL code to the server at once... > But presumably the datatypes would require atomicity in the form of > locking or transactions, which haskelldb would have to support, as > well as 'if' statements or 'if' functions for logic. An alternative > would be to write stored procedures directly in SQL. (can haskelldb > generate these?) A separate issue is enforcing type constraints, such > as saying that an 'id' value in a certain column can only be used to > look up elements of certain other columns, it seems like it could be a > capability of haskelldb, is it? HaskellDB already has support for transactions (with MySQL I think you=20 need to set the table type correctly for this to work, see the MySQL=20 manual) and if functions. There is no support for stored procedures,=20 though it could be a nice project for someone to look at. For the id columns, do you mean that one couldn't get at the actual=20 value, just use it to look up other values? Or what is the type=20 contraint here? /Bj=F6rn |