Database Theory and Type systems/Programming Languages.

So, just recently I read The Third Manifesto, and since I'm interested in programming languages, dissatisfied with SQL, and thinking about databases I figured I would post some of my questions here.

I don't know that much about modern type systems, but in the book, their discussion of type systems seems a little archaic compared to the sorts of things people bring up here. If there is anyone more knowledgable than I, I would appreciate some insight into how their stuff fits in the grand scheme of things.

Also, I recall in Concepts, Techniques, and Models of Computer Programming they discuss transactions and constraint based programming and do some connections with databases, but it mostly just left me wanting more. Has anyone successfully added the "Relational Model" to a programming language and integrated into the type system in a nice, and theoretically justified way?

I'm sorry if my questions aren't quite coherent. I don't know enough to ask it, but it seems like there are strong connections to their work with other areas of programming language research, but that perhaps the two camps have not gotten together and seen to integrate the two areas.

Oh yeah, I've read enough of DB Debunkings to realize that C.J. Date and company can be a bit ornery, but I just want to see how these two things intersect. I'm definitely not part of the camp trying to clamour for "Object Oriented/Relational/whatever" database, just someone trying to understand the theoretical aspects of databases in the context of programming languages.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Prolog?

Pardon my ignorance, but where does old good Prolog fall short of "Relational Model"?
If in types, then Oz might be an answer...

Re: Prolog?

I don't know. Mostly, the authors of the Third Manifesto seem to feel that nothing implements the Relational Model correctly, and they have all these theoretical pronouncements of what the Relational Model is, and they extend it("orthogonally") with a data type model that they claim is Object Oriented(not to open _that_ can of worms...)

Is there a "native" Oz database that could be truly said to be "relational". I'm aware of Mnesia, but I don't know enough about Erlang or Mnesia to be able to talk about it, is Mnesia truly "relational"(i.e. would C.J. Date say it was a better realization of the model than say, SQL :).

I hate to use the test of "What would C.J. Date say", but I'm trying to get a feel for their work in the larger picture of programming languages. Would C.J. Date say that Prolog is an acceptable implementation of the Relational Model? What of its heirs like Mercury? What about types? They have a lot to say about types, but I don't know enough to know if they're building off of type system research that this community is aware of, or if they just went it alone, and haven't studied any of the more recent developments in type theory.

The book is not written in the most reader friendly style, and I get the feeling that what they are saying is important, I just want to frame it in a proper context against what the rest of the world is doing.

I'm just a poor lonely graduate student avoiding my actual research :).

Does "relational" imply "DB"?

Is there a "native" Oz database

Hmm, so you want a relational database? I thought you want relational model.

Prolog (I think) deals with predicates, which (I think) are isomorphic to relations, so one can say that it implements a relation model. To validate it against the relational model, one needs to go through all 10 Dr Cobb commandments, which I don't have handy...

Regarding Mercury - last time I checked, it had a notion of modes, which (I think) break the isomorphism.

I would not post this, as this is definitely not my area of expertise, but seems that hot weather made people a bit lazy :-)

Concrete example

See LIBRA, written in Prolog, clearly is a different language from Prolog.

Strongly-typed databases

Perhaps you might find the following paper, which talks about
*strongly*-typed database interface relevant:

http://www.cwi.nl/~ralf/HList/

Please see examples of Database programming in Section 8. The paper
has been accepted for the Haskell workshop.