10

We currently have a 10 year old nasty, spaghetti-code-style SQL Server database that we are soon looking to pretty much re-write from scratch as part of a re-write to a large web application. (The existing application will serve as the functional requirements for the next incarnation of the app) The new version will be developed in .Net, so a large portion of the application stack will be based on Microsoft technologies (Visual Studio will be used IIS will be the application server).

One of the developers on the project has raised the possibility of switching to MySQL instead of SQL Server in order to save on cost for both the licence of the DB server, as well as the tools to design and manipulate the DB (such as the wonderfully free MySQL Workbench).

What are the various pros and cons of using SQL Server vs. MySQL as the database for a complex .Net project? Price is one factor we have identified, both in terms of the DB server licence as well as tools to manipulate the DB, but what other factors come into play?

2
  • Is your database big enough that you can't use the free Express version of Microsoft SQL Server? Apr 15, 2010 at 17:39
  • In this case, it is a moderately large web application with a DB on the order of tens of GB (so not too large), but there is a good amount of traffic and a good deal of growth is likely in the next 6 - 9 months.
    – cdeszaq
    Apr 15, 2010 at 19:54

7 Answers 7

6

My pro/con list for MySQL vs. SQL Server for .NET projects would be:

Pros to MySQL:

  1. Cost

Pros to SQL Server:

  1. Better tooling support, especially for .NET (Entity Framework + other ORM support is MUCH better)
  2. Better Visual Studio support
  3. Better integration support, especially if you want to do things like Silverlight + RIA, etc.
6

Have a look at

1
  • 1
    +1 - a good answer. The others focus on funny optical sides, not on the differences (hugh) in the database technology.
    – TomTom
    Apr 15, 2010 at 16:08
4

With SQL Server, you can have better tooling integration ( such as designers) between your entity class and your database schema.

You can just drag a database and drop it in the designer, and viola! All the entities mapping to the tables and their relationships are generated. alt text
(source: scottgu.com)

As for MySQL, obviously licensing cost is an advantage

0

It sounds like this is a large project you are working on. Obviously license cost will be higher using SQL Server compared to MySql, but there are many hidden costs using MySql too.

If this is a very large project and your team of developers are already trained in SQL Server, the additional cost of license for SQL Server compared to the cost of hundreds of hours of development time is minesque.

1
  • The "training" the developers currently have is basic manipulation using SQL Management studio...so writing SQL queries, and using the Table Designer to lay out fields
    – cdeszaq
    Apr 15, 2010 at 16:50
0

Along with the other answers on this page, i'd also consider the following:

  1. MS SQL has database mirroring capabilities - if you need high availability and automatic failover, this would be something to consider.
  2. Local availability of experts. You should do a bit of research as to what your options are for local expert help. When your database is dead, you don't want to suddenly find out that no local help is available.
0

SQL Server Pros:

  • Transactions on all tables (No picking between the fast engine and the safe engine)
  • In SQL Server, when subqueries are the most natural way to write a query, you can go ahead and do it. Especially with derived tables and Where Exists subqueries, there's not likely to be a performance penalty.
  • Any samples you come across from MS are going to assume SQL Server. In my current job, having to translate everything to Oracle is always a nuisance.
  • I've found derived columns in SQL Server to be very handy, although they can confuse an ORM.
  • Does MySQL support foreign keys or check constraints, yet?
1
  • MySQL server supports foreign keys and checks constraints (if you use the innoDb) since very long ago, long before you wrote this answer
    – Kmeixner
    Sep 6, 2019 at 16:07
0

I personally would stick with MSSQL if using .NET. It's much more tool friendly, as some of people suggested before

But Java has some pretty friendly environments with MySQL. If you don't mind using Java, give it a try. NetBeans IDE with Java Persistance API is really MySQL friendly :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.