From: Frederik E. <fre...@a5...> - 2005-04-11 23:16:12
|
Hi, This question is only partly about haskelldb. 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) 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? Anyway, it seems like a promising use for SQL to me - implement complex large data structures in a portable way - but I've found very few relatively unhelpful references to it on the web, partly because I don't know a search term which doesn't select lots of pages with information on data structures used internally by sql databases. So if anybody has any suggestions or pointers I'd be interested. Thanks, Frederik -- http://ofb.net/~frederik/ |