Just like SQL Server, I do consult with MySQL, PostgreSQL, and MariaDB. One of the most popular questions, I often receive during my consulting engagement is that where can one download the sample database for various databases. While we should always test all of our queries with the real workload as well as the real database. However, whenever we are exploring the new feature, it is a good idea that we work with the sample database and build our scripts which we can eventually apply to the production database.
MySQL Sample Database
Just like SQL Server Sample Databases, MySQL also has sample databases and they are listed here: Example Databases. I am personally a very big fan of MySQL database sakila and whenever I am presenting a consulting session or training on performance Tuning, I use this database to demonstrate the capability of the MySQL.
Here is the list of the sample databases and their installation process.
- Sakila Database (documentation| download)
- World Database (documentation | download)
- Employee Data (documentation | download)
Out of all the three databases, Sakila database is my favorite database. The Sakila database was initially developed by Mike Hillyer, a former member of the MySQL AB documentation team, and is intended to provide a standard schema that can be used for examples in books, tutorials, articles, samples, and so forth.
What I really like about the Sakila database is that it contains the sample views, stored procedures, and triggers. Here is the instructions to install the sakila database on your server as well as the schema of the sakila database.
Let me know if you use any of the sample databases or build your own database. I would be interested to know what is your practice for the databases. Here is the link to how you can download and install the SQL Server sample database WideWorldImorters.
Reference: Pinal Dave (https://blog.sqlauthority.com)