If you're thinking about a relational database management system for your business, or developing an enterprise system, you'll need to weigh up Microsoft SQL Server and MySQL. The choice of RDBMS is a crucial upfront decision, since it sits at the heart of the system: all creation, storage, manipulation, security and management of data depends on it, and once you've chosen one, it's difficult to change to the other.

What the two have in common

Both are built around SQL, the language developed in the 1970s for communicating with and operating on relational databases, where data is stored as rows and columns that relate to each other within and across tables. Both store data in relational tables, host multiple databases on one server, support desktop and web applications, use similar syntax, connect easily, scale well, and use primary and foreign keys in the relationships between tables.

Where they differ

Microsoft SQL Server is a Windows-native product developed in the 1980s: reliable, scalable, and well documented, with free developer and express editions available for smaller or non-production use. MySQL, developed in the mid-1990s and now owned by Oracle, is open source, which makes it attractive to businesses without a lot of budget, though there's a paid Enterprise Edition too.

On usability, both are reasonably easy to set up, with plenty of documentation and community support behind each. On performance, MySQL tends to run better, particularly on Unix, while SQL Server compromises slightly on speed to offer a wider feature set, including the ability to cancel a query mid-process, XML support, stored procedures and full join facilities that MySQL lacks.

On platforms, SQL Server is primarily Windows-based but now supports Linux and Mac OS X, and pairs naturally with the .NET framework. MySQL runs across Windows, Linux and iOS, is usually part of a LAMP environment, and pairs most naturally with PHP. Both interpret the ANSI SQL standard slightly differently, with SQL Server using its own Transact-SQL extension and MySQL following ANSI SQL 99 more closely. Both are broadly secure, though SQL Server carries some additional native security tooling. On reporting, SQL Server has its own native suite, while MySQL usually needs third-party tools. On storage engines, SQL Server uses a single engine, while MySQL supports several, giving it more flexibility depending on what a given project needs.

Conclusion

There's no single correct answer. The right choice comes down to your specific requirements, budget, hosting environment and the platforms your team already works in. If security and a wider feature set matter most, SQL Server often makes sense. If you're building smaller to medium applications in PHP, or want the flexibility of multiple storage engines, MySQL may be the better fit. If you'd like a steer on which suits your project, get in touch and we'll talk it through.