Better HN
topnewbestaskshowjobs
Log inSign up

jakewheat

11 karma · joined Sep 30, 2013 (13y ago) · 7 submissions

Submissions

comment 13y ago · link · parent

The parser also does typechecking, and attempts to cover a good subset of DML, DDL and procedural SQL as well. Maybe it could be smaller!

How would you handle correlated subqueries when converting from SQL to RA?

comment 13y ago · link · parent

The was and continue to be a lot of refactorings, but they were/are pretty much all related to the complexity and sheer number of features in SQL. Haskell really gets out of the way, and helps make the refactorings much more easy.

comment 13y ago · link · parent

That is really fascinating, I will have a good look at that, thanks! I have a SQL parser in Haskell on github here (using Parsec): https://github.com/JakeWheat/hssqlppp

The model in the article is roughly based on the version in Date and Darwen's work which is almost the same as what you mention: project, rename, extend, join, union and not matching. The summarize by is kind of syntax sugar in this system. I left out some of the operators which weren't used anywhere in the code in the article. Industrial grade conversion from SQL to relational algebra is a real challenge!

comment 13y ago · link · parent

I guess a lot of it boils down to them never having heard of Haskell before.

comment 13y ago · link · parent

We have one other Haskell programmer, who previously worked with some other functional programming languages (mainly some dialect of ML I think) and was working with Erlang in his previous job, and he picked it up quite easily. I think he is unusual though, I found it much more difficult to learn (but extremely rewarding).

comment 13y ago · link · parent

Many people see it as a big risk (such as investors and customers) which makes it self-fulfilling.

comment 13y ago · link · parent

I think you are right. It should have said relatively unproven technology for SQL DBMS implementation.