Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I want to experiment with the 3 large database management systems. For this purpose it would be cool to have the same database (the same tables, etc.) for each of those.

Where can I find sql scripts which create identical test databases for MySQL, MSSQL and Oracle?

share|improve this question
    
Can you create a new account on dba.se using the OpenID you use on SO, then we'll be able to merge the two accounts from here if you ping me with a comment here or on The Heap –  Jack Douglas Feb 23 '12 at 17:08
1  
As an aside to Justin's excellent answer, Microsoft has a set of SQL Server sample databases here. –  Nick Chammas Mar 9 '12 at 18:36
add comment

3 Answers

up vote 11 down vote accepted

Oracle provides several sample schema, but as with Rolando's answer, you would have to convert these for the other databases.

My answer in a nutshell is Don't use identical scripts.

The problem with using scripts that are as similar as possible for each database is that you will be using least common denominator functionality. Using a database requires an investment in infrastructure, installation, support and development that will not reach it's full potential if the advantages of each platform are not utilized.

To truly do a comparison of these platforms, I suggest you determine what your requirements are and then implement those requirements in the best way possible for each database. This will of course require significantly more knowledge of the platforms, but any other comparison would only be academic.

Here are two examples.

Requirement: Show all days in a given date range with sales data for the day regardless of whether any sales were made that day or not.
Solutions: In Oracle you might do a cross join with a hierarchical query on dual returning all the days in the range. In SQL-Server you might use a CTE to generate the days. In MySQL you might use something else entirely.1

Requirement: Be able to run a query at any time to retrieve the data for any table as it existed at any point in time within the last four hours.
Solution: In Oracle you would only need to ensure that the undo retention was guaranteed and set to at least four hours. In other databases the implementation would be dramatically different.2

share|improve this answer
    
Bookmarking this one. +1 !!! –  RolandoMySQLDBA Feb 22 '12 at 18:15
    
Yes, yes a million times yes! –  HLGEM Mar 9 '12 at 16:09
add comment

MySQL provides a sample employee and world database

You may want to convert the SQL for these to work in Oracle and SQL Server

share|improve this answer
add comment

You can try to solve the same exercises on the same databases using MSSQL, MySQL, PostgreSQL at SQL Exercises site .

Oracle is in future plans.

P.S. Oracle is available now.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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