views:

202

answers:

6

In which pratical scenarion would you prefeer one or the other? I know there are a lot of parameter you can compare, can you give me some practical examples?

Example: mysql in case of multiple databases with few tables, sql server for single database with lots of tables because....

+1  A: 

apples vs. oranges. Mysql isn't a valid, ACID compliant database, hence, it's actually only usable if you're doing reads and not writes. However, I'd then still prefer a solid ACID compliant database, so I'd go for any real database before going for mysql (if you want to use free db's, postgresql is a good alternative to mysql).

Frans Bouma
This is blatantly wrong. MySQL using the InnoDB sotrage engine is ACID compliant.
cletus
As well as Falcon.
K. Brian Kelley
@cletus: nope. It still leaves transactions dangling sometimes and can come into a state where it doesn't report a failure and simply commits. I see some people downmodded me. How sad. :)
Frans Bouma
You'd get a lot further with a contrary POV if you had references for your assertions. This looks like it's only your personal opinion, with nothing to support it.
le dorfier
http://sql-info.de/en/mysql/transaction-innodb-table.htmlBut there are other resources on this as well. It's fairly well known that there are problems with MySql's transaction engine, which aren't always that important, though it should be considered for mission critical apps, IMHO.
Frans Bouma
+5  A: 

In a practical situation, it makes no difference unless you have a massive system where such things as mirroring, RAC whatever are needed for your solution. For most applications the database platform is irrelevant.

Some thoughts:

  • What does the rest of the company do? No point in trying for MySQL if you have a DBA team supporting hundreds of MS SQL Servers

  • Client language. My personal view is that some client languages are better suited to their "natural" DB platform, but this stems from if you're in a MS shop or a Java shop

  • Budget. If you want to have a MS consultant on site in 4 hours, you'll have to pay for it. What is the loss to your business per minute if something is wrong?

  • Politics. I disagree with some aspects of how our DB engineering set up the corporate MS SQL build but I have no choice. If you're in academia, your cardigan wearing pipe smokers tutors will hate Microsoft.

gbn
+1  A: 

I'll point to the elephant in the room first : mysql is free. Seriously , this is a big advantage. So if I was heading a startup , I would give it a big thumbs up.

Apart from that , if I had a windows only shop I would prefer SQL server as it integrates well with the other MS development tools like Visual Studio , sharepoint etc.

MySQL can run on *nix so in certain cases SQL server drops out of the race.

Apart from these obvious differences, both are mature databases and rarely one can be chosen over other just for performance and/or other technical benefits.

Learning
And SQL Server Express is free and has most of the features as SQL Server. One of the few big things it doesn't have is the SQL Server Agent, but SQL Server MVP Denny Cherry has a stand-alone SQL Server Agent project to remedy that.
K. Brian Kelley
postgresql is also free, and a much better alternative than Mysql.
Frans Bouma
Frans : I have nothing against postgresql but that was not in the question asked.
Learning
K Brian Kelley : Isn't Express is for personal use? Can I build a commercial site/product around that?
Learning
+1  A: 

The criteria I use:

  • Is the solution hosted on Linux? If so, the discussion would then turn to MySQL vs. PostgreSQL.
  • What is the expertise of the DBA staff? This makes a big difference.
  • What type of development is going to be done against it? If primarily .NET, then this would lean in SQL Server's favor because there are far more examples, etc., about how to use .NET code with SQL Server than .NET code with MySQL.
  • Are there specific features that you're going to need to use? For instance, SQL Server 2008 Enterprise has Change Data Capture, Audit objects, DDL and logon triggers, for assisting with ETL and security that are features that MySQL obviously doesn't have (yet).

As to a previous poster, I would agree with budget to a certain extent, but for support of MySQL from Sun/MySQL, you're going to pay as well. And if you want a MySQL consultant, again, you'll need to pay for their time and services. Both have very active communities, so unless it's a major issue, you'll likely to be able to find lots of help and good folks to answer general questions.

K. Brian Kelley
A: 

The best choice is going to be the one that fits best with the rest of your toolset. If you are a .NET shop, then SQL Server will be the best fit. If you are partially or wholely a LAMP or WAMP shop, then MySQL. If you are something else, then you're probably already adept enough to decide, but short of that, which database is most often used in tutorials and other documentation for your tools?

le dorfier
+1  A: 

Even though I prefer to use OS software and software that runs on multiple platforms, I have to admit that I prefer to use MS SQL over MySQL. IMO, MS SQL is the only good that came out of MS (it was purchased though ;)

MS SQL simple has more power when it comes to writing stored procedures, user defined functions, subqueries, derived tables, etc. Whenever I use My SQL I end up feeling very restricted (and i do search the docs for alternatives to my usual queries)

That said, if you just use your sql server as a storage entity (which unfortunately many developers do) you are just as well off with My SQL as MS SQL.

/B

Brimstedt