Quantcast

Interest in typed relational algebra library?

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Interest in typed relational algebra library?

Paul Visschers-2
Hello,

I've been out of the Haskell game for a bit, but now I'm back. A couple of years ago I made a small library that implements relational algebra with types so that malformed queries and other operations are caught at compile time. It is heavily based off of the internals of HaskellDB (see http://hackage.haskell.org/packages/archive/haskelldb/2.1.1/doc/html/Database-HaskellDB-PrimQuery.html), but types so that it can actually be used directly instead of having to use HaskellDB's query monad. Besides the joy of using relational algebra directly in your code, this also means that you can make query-optimizing code in a type-safe way, you can subquery results returned by the database directly without accessing the database again and you have more options when converting from relation algebra to SQL or another query language. The library isn't quite ready for release, but I might want to work on it a bit and then release it. Is anyone interested in such a library?

Paul Visschers

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Interest in typed relational algebra library?

Ertugrul Söylemez
Paul Visschers <[hidden email]> wrote:

> I've been out of the Haskell game for a bit, but now I'm back. A
> couple of years ago I made a small library that implements relational
> algebra with types so that malformed queries and other operations are
> caught at compile time. It is heavily based off of the internals of
> HaskellDB (see
> http://hackage.haskell.org/packages/archive/haskelldb/2.1.1/doc/html/Database-HaskellDB-PrimQuery.html),
> but types so that it can actually be used directly instead of having
> to use HaskellDB's query monad. Besides the joy of using relational
> algebra directly in your code, this also means that you can make
> query-optimizing code in a type-safe way, you can subquery results
> returned by the database directly without accessing the database again
> and you have more options when converting from relation algebra to SQL
> or another query language. The library isn't quite ready for release,
> but I might want to work on it a bit and then release it. Is anyone
> interested in such a library?
As someone who enjoyed the HaskellDB library I'm very interested in such
a library, even though nowadays I mostly use acid-state.


Greets,
Ertugrul

--
Not to be or to be and (not to be or to be and (not to be or to be and
(not to be or to be and ... that is the list monad.

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe

signature.asc (853 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Interest in typed relational algebra library?

Carter Schonwald
In reply to this post by Paul Visschers-2
I'd be interested in at least playing with it. 

On Saturday, July 7, 2012, Paul Visschers wrote:
Hello,

I've been out of the Haskell game for a bit, but now I'm back. A couple of years ago I made a small library that implements relational algebra with types so that malformed queries and other operations are caught at compile time. It is heavily based off of the internals of HaskellDB (see http://hackage.haskell.org/packages/archive/haskelldb/2.1.1/doc/html/Database-HaskellDB-PrimQuery.html), but types so that it can actually be used directly instead of having to use HaskellDB's query monad. Besides the joy of using relational algebra directly in your code, this also means that you can make query-optimizing code in a type-safe way, you can subquery results returned by the database directly without accessing the database again and you have more options when converting from relation algebra to SQL or another query language. The library isn't quite ready for release, but I might want to work on it a bit and then release it. Is anyone interested in such a library?

Paul Visschers

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Interest in typed relational algebra library?

Jay Sulzberger
In reply to this post by Paul Visschers-2


On Sat, 7 Jul 2012, Paul Visschers <[hidden email]> wrote:

> Hello,
>
> I've been out of the Haskell game for a bit, but now I'm back. A couple of
> years ago I made a small library that implements relational algebra with
> types so that malformed queries and other operations are caught at compile
> time. It is heavily based off of the internals of HaskellDB (see
> http://hackage.haskell.org/packages/archive/haskelldb/2.1.1/doc/html/Database-HaskellDB-PrimQuery.html),
> but types so that it can actually be used directly instead of having to use
> HaskellDB's query monad. Besides the joy of using relational algebra
> directly in your code, this also means that you can make query-optimizing
> code in a type-safe way, you can subquery results returned by the database
> directly without accessing the database again and you have more options
> when converting from relation algebra to SQL or another query language. The
> library isn't quite ready for release, but I might want to work on it a bit
> and then release it. Is anyone interested in such a library?
>
> Paul Visschers

Yes!

And yes to first order predicate calculus too!

oo--JS.


_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Interest in typed relational algebra library?

Rune Harder Bak
In reply to this post by Paul Visschers-2
Yes, that would be very nice!

Type-checked queries really is a must, but I´ve found HaskellDB too
cumbersome to work with.

-Rune

On Sat, Jul 7, 2012 at 11:45 AM, Paul Visschers <[hidden email]> wrote:

> Hello,
>
> I've been out of the Haskell game for a bit, but now I'm back. A couple of
> years ago I made a small library that implements relational algebra with
> types so that malformed queries and other operations are caught at compile
> time. It is heavily based off of the internals of HaskellDB (see
> http://hackage.haskell.org/packages/archive/haskelldb/2.1.1/doc/html/Database-HaskellDB-PrimQuery.html),
> but types so that it can actually be used directly instead of having to use
> HaskellDB's query monad. Besides the joy of using relational algebra
> directly in your code, this also means that you can make query-optimizing
> code in a type-safe way, you can subquery results returned by the database
> directly without accessing the database again and you have more options when
> converting from relation algebra to SQL or another query language. The
> library isn't quite ready for release, but I might want to work on it a bit
> and then release it. Is anyone interested in such a library?
>
> Paul Visschers
>
> _______________________________________________
> Haskell-Cafe mailing list
> [hidden email]
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Interest in typed relational algebra library?

Dag Odenhall
Is this anything like the hssqlppp package?

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Interest in typed relational algebra library?

oleg-30
In reply to this post by Paul Visschers-2

> And yes to first order predicate calculus too!

Just two weeks ago Chung-chieh Shan and I were explaining at NASSLLI
the embedding in Haskell of the higher-order predicate logic with two
base types (so-called Ty2). The embedding supports type-safe
simplification of formulas (which was really needed for our
applications). The embedding is extensible: you can add models and
more constants.

        http://okmij.org/ftp/gengo/NASSLLI10/course.html#semantics


_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Interest in typed relational algebra library?

Jay Sulzberger


On Tue, 10 Jul 2012, [hidden email] wrote:

>
>> And yes to first order predicate calculus too!
>
> Just two weeks ago Chung-chieh Shan and I were explaining at NASSLLI
> the embedding in Haskell of the higher-order predicate logic with two
> base types (so-called Ty2). The embedding supports type-safe
> simplification of formulas (which was really needed for our
> applications). The embedding is extensible: you can add models and
> more constants.
>
> http://okmij.org/ftp/gengo/NASSLLI10/course.html#semantics

Oleg, thank you.  Which article should I read first?

oo--JS.

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Interest in typed relational algebra library?

Jay Sulzberger


On Wed, 18 Jul 2012, Jay Sulzberger wrote:

>
>
> On Tue, 10 Jul 2012, [hidden email] wrote:
>
>>
>>> And yes to first order predicate calculus too!
>>
>> Just two weeks ago Chung-chieh Shan and I were explaining at NASSLLI
>> the embedding in Haskell of the higher-order predicate logic with two
>> base types (so-called Ty2). The embedding supports type-safe
>> simplification of formulas (which was really needed for our
>> applications). The embedding is extensible: you can add models and
>> more constants.
>>
>> http://okmij.org/ftp/gengo/NASSLLI10/course.html#semantics
>
> Oleg, thank you.  Which article should I read first?
>
> oo--JS.

Ah, I see that the files are Haskell source files, and not Postscript files.

The order is clear.

oo--JS.

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Loading...