I’ve just completed an article for Hardcopy magazine on database APIs – it’s for a forthcoming issue so the piece is not online yet. I interviewed Mark Troester, senior manager of product marketing at DataDirect, and he gave me some interesting comments on LINQ (Language Integrated Query), Microsoft’s new database extensions for the .NET Framework.
There’s a lot of confusion out there because there is LINQ to SQL and LINQ to the entity model, and the LINQ to SQL stuff that has just got released in beta is specific to SQL Server, so Microsoft needs to do some work in terms of getting things better organized. I think their argument would be that they need a lot of flexibility, but from what we see when we talk to customers, people are just massively confused.
As I continued my research I could see what he meant. What I think is the official home page has plenty of resources, but it’s a bit of a mess. If you click the link to the FAQ – actually a forum post – you find it dates from March 2006 and talks about DLINQ, which is now an obsolete term (I think). The project overview is pretty good, but gets you deep into Lambda Expressions and Extension Methods without mentioning important practical issues like the fact that LINQ to SQL seems to be exclusive to SQL Server. This unfortunate fact is confirmed by Microsoft here:
Q: It was mentioned that there is currently no LINQ to SQL support for Oracle or MySQL databases. Will it be possible for developers to implement their own SqlProvider implementations for these database engines?
A: We don’t really have a provider model or provider writers’ SDK in this release (Orcas). So it is possible to build a LINQ provider similar to LINQ to SQL; but unfortunately, in this release, we won’t be able to offer much to make that as simple as we would like.
Of course you could still use LINQ to DataSet with Oracle or MySQL data … see why it gets confusing?
By contrast, I like Granville Barnett’s Introducing LINQ series (though not the pop-up ads), which takes a hands-on approach, as does Scott Guthrie’s LINQ to SQL series (the link is to part 5, but it references the other articles).
I also highly recommend Matt Warren’s blog post on The Origin of LINQ to SQL and the interesting comments.
LINQ looks compelling; I hope Microsoft manages to improve the clarity of its LINQ information soon.