CodeBetter.Com
CodeBetter.Com
RSS 2.0 via Feedburner
           Do you Twitter? Follow us @CodeBetter

Grant Killian's Blog

No, this has nothing to do with beer -- but maybe it should?

MySQL and .Net

I've noticed more and more customers getting into MySQL instead of paying for SQLServer.  For the record, I much prefer developing with SQLServer because there are many features MySQL doesn't have; that being said, MySQL has an attractive price tag for inhouse application development -- free -- and offers the basics.  I generally side with Frans Bouma's post about Stored Procs adding a new API to maintain in your application; I use a data-entity framework that constructs SQL statements in memory, based on class metadata.  It's very slick and I never have to worry about porting an app from SQLServer to MySQL (or elsewhere) because it's plain vanilla SQL.  Now, I still end up writing Stored Procedures from time-to-time, but only when the customer intends to be tied to SQLServer.

The following link is a good one for connecting to MySQL with .Net: http://www.mysql.com/articles/dotnet/ (although the site to download dbProvider from eInfoDesigns is dead --hopefully only temporarily!).  I've had success with the MyODBC driver, but I'm following the MySQLConnection work that's going on at SourceForge -- still in beta but it won't be for long.

Of course, when Yukon becomes available the gap between SQLServer and MySQL will broaden.  From what I've read about Yukon, it sounds like the term “Database” takes on new meaning to Microsoft -- they've added whole layers of functionality that MySQL can't compete with.  SQLServer development will dramatically change, and sticking to “plain vanilla SQL” will surely become less attractive and productive . . . but for now, with MySQL, it's not a bad substitute.

Happy .Netting!



Comments

Brendan Tompkins said:

Grant. There's a good article on SQLJunkies at http://www.sqljunkies.com/Tutorial/21DC68CD-1A97-4909-8157-523CA249CC80.scuk about .NET inside Yukon...
# January 30, 2004 1:23 AM

JosephCooney said:

Although I don't know a great deal about MySQL, I've heard that postgresql and SAP-DB are more standards compliant than it, and the licenses are more "open" (whatever that means). Pretty sure they are both accessible via ODBC. Either way MySQL is certainly NOT the only free, cross-platform relational database out there.
# January 30, 2004 7:58 PM

Rakesh said:

Postgres is the more "complete" db but MySQL is rapidly catching up. Latest release I believe now has sprocs and views. SAPDB is the industrial strength db that powers SAP apps but is now owned(or marketed) by MySQL and is marketed as MaxDB.

The MySQL engine is very stable(and *fast*) and can handle millions of records. A friend is developing a project with 7 million records on MySQL. In one eWeek benchmark it beat Oracle in raw performance. Its full text capability is really powerful. For visual admin of the dbase use Navicat instead. It makes admin of MySQL as easy as SQL Server. The admin tool thats downloadable at MySQL.com is crap and buggy.

There are also other .NET providers now available for MySQL besides the ones Grant mentioned.

Theres no comparison between MySQL and SQLServer. The latter has tons of features. But MySQL is good enough though for a vast majority of regular db work.

Despite other open source dbs it seems to be the most popular and has strong momentum. Keep in mind, that *free* database comes with *unlimited* connections. A similar commercial DB like SQL Sever or Oracle would set you back $20k.

It would be interesting indeed how this all plays out.

http://www.navicat.com/product.php3


# February 2, 2004 4:47 PM

Grant said:

Good points. I have friends who swear by Postgres and even worked for Great Bridge (a Postgres services company that is now, I think, out of business).

In Rakesh's comment, he points out Navicat as the better GUI tool for MySQL. Navicat costs about $100, while MySQL Control Center is free. Navicat is polished and professional while MySQL Control Center is buggy and a bit difficult to work with.

For our MySQL customers, we give them the choice of which SQL Admin tool to use. Oddly, $100 is more than many customers are interested in when there is a free alternative.
# February 3, 2004 2:35 AM

Rakesh said:

by the way, one non SQL Server database that has really great .NET support is DB2. Project am on at the momment is ASP.NET against a DB2 UDB. I thought I was going to be disappointed by the lack of support but was really surprised. Not only is there a native provider but add in tools for Visual Studio as well. Their Stinger technology has its own dataadapter wizard, type dataset, sproc generator etc all cleanly integrated in VS. It makes .NET development against DB2 a breeze as compared to other non SQLServer dbases.


http://www-106.ibm.com/developerworks/db2/library/techarticle/0304alazzawe/0304alazzawe.html



# February 3, 2004 4:09 PM

Leave a Comment

(required)  
(optional)
(required)  

Enter the numbers above:
Add
Check out Devlicio.us!