LINQ to MySQL, Oracle and PostgreSQL Providers - Provider Possibilities
(Page 2 of 4 )
It should be made clear that no provider will ever match the production quality of Microsoft's LINQ-to-SQL. Their official support for Microsoft SQL Server and Access is flawless, and right now all of the possible providers are either prototype software, in the alpha/beta stages, under development, or provide some sort of abstraction that acts a workaround to allow LINQ support for other databases, as well.
Therefore, don’t expect a perfect provider because there isn't one. It's as simple as that! Most of them are going to suffice for simple queries, basic bulk inserts, and some simple commands, while some functions would certainly be missing, others would appear to be broken...you name it. Our purpose is to play around with them and see how they work, what they are capable of, and how to implement them into our app.
If you want to take the officially-supported route and perhaps get the highest possible production quality level, then you should try the latest Connector/NET version of MySQL that’s available right at the moment. That is, if you want MySQL support for .NET languages. At the time of writing, there are no LINQ additions/patches included in the Connector. If you want to get into deeper solutions, then Entity Framework is for you.
The ADO.NET Entity Framework, developed by Microsoft, supports LINQ-to-Entities. Getting into this even deeper is beyond the article’s scope, but as you can already guess, this is a rock-solid way to work with Entities and Entities-over-WCF (Windows Communication Foundations), while using MySQL as a back-end. This is probably one of the most advanced ways to always being able to query the database with LINQ.
All right, now drifting back to our topic here—let’s talk about LINQ providers. First and foremost, let’s begin with DbLinq. It is open source and under development, but one of the most popular LINQ-to-other database providers. In short, it is an ORM (Object-Relational Mapping) tool and supports the most basic of LINQ queries and commands. At the moment their support extends to MySQL, Oracle, PostgreSQL, and SQLite.
We are going to focus a bit more on DbLinq on the next page, but right now let’s continue our presentation of available providers. Let’s introduce NHibernate. Probably you have already heard of Hibernate. It’s a high-performing, advanced, and reliable ORM for Java. The APIs offer object mapping between Java and database tables, and have support for XML, too. It’s open source and free. NHibernate is the same for .NET.
That’s right, Hibernate has been ported to the .NET languages as well, and that’s why the new framework is being called NHibernate. Native support for .NET is available, along with various mind-blowing functionalities. Right at the moment the latest version is 2.0, but 2.1 is supposed to be out soon. Once it’s out, it will shock the world; it is expected to include an LINQ provider in the framework. That would be amazing.
One of the main contributors to the NHibernate project, Ayende Rahien, has been talking about LINQ support of NHibernate since March 2007. Surely back then everything was uncertain and in the early stages of development, but even so, the examples he has shown on his website were “working code” and passed the tests. Therefore, it is highly likely that the promised NHibernate 2.1 will include a functional LINQ provider.
Moving on, let’s mention LightSpeed. Its name sounds fancy, right? No, we aren’t referring to c, which is the speed of light, whose value is almost 300M m/s. It is a product developed by Mindscape. It offers production quality level abstraction. Basically, LightSpeed is claimed to be blazing fast, and the best ORM framework available, with first-class LINQ support and full integration into Visual Studio 2008.
LightSpeed is a commercial product that requires licensing. However, for those who are working with relatively small databases, the Express Edition could suffice, and is freely available. It is limited to 8 model classes. The Standard License comes for $100 and covers up to 30 model classes, while the Professional version can be had for $300 and it has no limitations. The Enterprise version is $500 and includes the source code.
Next: More About DbLinq >>
More MS SQL Server Articles
More By Barzan "Tony" Antal