4
$\begingroup$

I am familiar with the Northwind database and Chinook database as good toy databases for allowing students to practice writing queries. Are there other databases in a similar vein that are available? I want something with a sensible real-world data model and enough data to be interesting.

In particular, I'm interested in databases that can be downloaded/built from a set of SQL statements in a script - building the tables, adding the foreign key relationships, inserting the data, etc. That way, students can add data under the constraints of the database (e.g., foreign keys). Thus, I am looking for databases that are downloadable in formats compatible with major RDBMS implementations (e.g., MS SQL Server, MySQL, SQLite). This differentiates this question from the previous question regarding datasets, which focuses on flat files, or databases available as flat file.

$\endgroup$
0

4 Answers 4

4
$\begingroup$

I stil think this is basically a duplicate of this question: Good datasets for intro CS courses?

You're asking for a database of interesting data. The other question is asking about interesting data. The only thing you need to do to get from the answers in that question to the answers to your question is to write a little bit of processing code that outputs the data in a format that's compatible with a database.

In other words, you're going to have to massage the data. This might require writing a program that calls an API to get data, and then outputs that data to .sql files or more basic .csv files or something. Then the students would take those files and work with them to create their databases.

I think as soon as you accept the fact that you're going to have to massage the data, you'll open yourself up to a lot of cool data sets. I think restricting yourself to data that's already in the exact format you need is very limiting, and isn't how things work in the real world. In the real world, data is always in the wrong format. You always have to convert it to something you can use.

Stop looking for data in the format you want it in. Start looking for interesting data, and then figure out how to get it in the format you want it in.

$\endgroup$
3
  • $\begingroup$ I understand your point, and @Ben I. made the same one when I posted this question. But, there's a lot more to a database than just the data (e.g., constraints on attributes, primary/foreign key relationships). I am certainly fine massaging data - I am no stranger to that - but it would be nice to also not need to go through and add all of these different DB-specific components/guess what the designer had intended for their dataset. I want students to be able to manipulate the data and see these things in action (e.g., delete a primary key, see it cascade to foreign key tuples). $\endgroup$ Commented Nov 16, 2017 at 11:05
  • $\begingroup$ @cryptic_star Adding those restrictions is part of the massage process I'm talking about. The chances of you finding a data set in exactly the format you want is very low. My point is that you should just put it into the format you want yourself, and stop trying to find perfectly formatted data. You'll open yourself up to a lot of cool data sets if you think about it that way. $\endgroup$ Commented Nov 16, 2017 at 16:42
  • $\begingroup$ I understand, and I might very well end up going that route in the future. But, clearly there are at least two such datasets (linked in my original question), so I think the question is valid and hope others might contribute what they can find. I simply find myself in an unexpected position of needing such a set of data ASAP differing from the two above. $\endgroup$ Commented Nov 16, 2017 at 17:28
2
$\begingroup$

Look into demo instances for real products that run on various databases. I see more of sqlserver, oracle, and db2 in enterprise apps.

Download some free demo instances of Openmaint, Maximo, redmine, or other apps that are backed by a serious database,.

$\endgroup$
1
$\begingroup$

You can check out the WorldWideImporters db (from Microsoft):

https://github.com/Microsoft/sql-server-samples/releases/tag/wide-world-importers-v1.0

Or the AdventureWorks db (from Microsoft as well):

https://github.com/Microsoft/sql-server-samples/releases/tag/adventureworks (links at the botto still work)

$\endgroup$
1
$\begingroup$

You can look at the datasets used for TPC benchmarks. You can find the tools and instructions needed at http://www.tpc.org/tpc_documents_current_versions/current_specifications5.asp

The advantages of the TPC benchmarks are:

  1. The data is generated and loaded by scripts. The schema is also created by SQL scripts (like you have asked).

  2. The size of the database you want to create is configurable.

  3. The benchmarks are used widely and hence knowledge of their structure and usage will come in handy.

The main disadvantage of the dataset is that most of the data generated is random data and hence may not make much sense to human readers.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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