Login Register

What's the Difference Between SQL and MySQL?

SQL Server is owned by Microsoft.

The SQL Server dialect of SQL is called T-SQL, or Transact SQL. It adheres to the ANSI standard fairly well. It is fully ACID compliant, and Microsoft has been quite aggressive in recent years to continue to add features to stay competitive with other RDBMSs in addition to the foundational elements that most every RDBMS has.

From a development perspective, these recent features include window functions, the PIVOT & UNPIVOT clauses, the OFFSET FETCH clause that extends ORDER BY for pagination, table partitioning, columnstore indexes, data compression, filtered indexes (indexes with a WHERE clause), Common Table Expressions (CTEs), temporary tables, and more.

From a database administration perspective, SQL Server offers Maintenance Plans (to manage backups), Policy-Based Management (used to enforce standards & policies across a fleet of database servers), Transparent Data Encryption (TDE), Resource Governance, a built in ETL tool (SSIS), built in reporting & analytiics tools (SSRS & SSAS) and more. There is a very active community of SQL Server developers and administrators, so it’s not difficult to find good talent.

SQL Server has traditionally been installed only on Windows servers, but Microsoft recently announced that SQL Server 2016 and beyond can be installed on Linux as well. Should be interesting to hear about how that goes.

Aside from the Developer and Express editions of SQL Server, you must pay licensing costs, which can be quite high.

There is a rich community of SQL Server DBAs & developers out there. Most SQL Server professionals are able to work as committed DBAs & developers, as it seems the businesses that implement SQL Server tend to be larger than those who implement MySQL, and have the budgets. This last statement is a huge generalization.

MySQL:

MySQL is considered open source, it is currently owned by Oracle, which occurred via the acquisition of Sun Microsystems in 2010.

MySQL has it’s own dialect of SQL, which is similar to most other RDBMSs, and adheres to the ANSI standard fairly well. MySQL has 9 storage engines (most other RDBMSs offer only 1). If you want ACID compliance, you must choose the InnoDB storage engine, as none of the other engines provide ACID compliance. InnoDB supports transactions and foreign keys, which in my opinion are essential. MySQL does not support Window Functions and Common Table Expressions, and many other convenient development features that SQL Server does. That doesn’t mean you can’t do what you need to, but rather that you must use a different (often more cumbersome) solution. MySQL does support temporary tables, but for some reason you cannot refer to the same temporary table twice in the same SELECT statement, which is not the case with SQL Server. This limitation with temporary tables can cause you to double or triple your memory usage for the same data set, depending on what you’re trying to do.

In full disclosure, I haven’t done much MySQL administration like I have with SQL Server, so I can’t speak to the administration features of MySQL.

MySQL Can be installed on Windows, Linux, and a few other operating systems and it's supported by most web hosting service providers.

Although MySQL is open source, if you want support from Oracle, I hear licensing costs are similar to those of Oracle (I can’t confirm this from personal experience).

In general, it seems to me that MySQL can be a fine choice to support the applications you need to build. And it can be very appealing due to being open source. I have found it to be more clunky to use compared to SQL Server, mostly due to the lack of development features in comparison to SQL Server.

The type of developer I have seen with MySQL experience is more of the web developer type. I think this is because you see smaller shops that like the idea of open source (free) database implementations. This doesn’t mean there are no full time, committed MySQL DBAs, but in general, the MySQL expert seems to wear more hats, and be in a more “startup” type of environment.