Answers.Body: <p>I stil think this is basically a duplicate of this question: <a href="https://cseducators.stackexchange.com/questions/1394/good-datasets-for-intro-cs-courses">Good datasets for intro CS courses?</a></p>
  
  <p>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.</p>
  
  <p>In other words, you're going to have to <strong>massage</strong> the data. This might require writing a program that calls an API to get data, and then outputs that data to <code>.sql</code> files or more basic <code>.csv</code> files or something. Then the students would take those files and work with them to create their databases.</p>
  
  <p>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.</p>
  
  <p>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.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-11-16T11:05:28.573Z
Answers.Text: 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).
Answers.UserDisplayName: cryptic_star
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-11-16T16:42:28.470Z
Answers.Text: @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.
Answers.UserDisplayName: Kevin Workman
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-11-16T17:28:00.940Z
Answers.Text: 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.
Answers.UserDisplayName: cryptic_star
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-11-16T00:30:37.460Z
Answers.LastActivityDate: 2017-11-16T00:30:37.460Z
Answers.UserDisplayName: Kevin Workman
Answers.Body: <p>Look into demo instances for real products that run on various databases.  I see more of sqlserver, oracle, and db2 in enterprise apps.</p>
  
  <p>Download some free demo instances of Openmaint, Maximo, redmine, or other apps that are backed by a serious database,.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-11-16T09:05:52.637Z
Answers.LastActivityDate: 2017-11-16T09:05:52.637Z
Answers.UserDisplayName: pojo-guy
Answers.Body: <p>You can check out the WorldWideImporters db (from Microsoft):</p>
  
  <p><a href="https://github.com/Microsoft/sql-server-samples/releases/tag/wide-world-importers-v1.0" rel="nofollow noreferrer">https://github.com/Microsoft/sql-server-samples/releases/tag/wide-world-importers-v1.0</a></p>
  
  <p>Or the AdventureWorks db (from Microsoft as well):</p>
  
  <p><a href="https://github.com/Microsoft/sql-server-samples/releases/tag/adventureworks" rel="nofollow noreferrer">https://github.com/Microsoft/sql-server-samples/releases/tag/adventureworks</a> (links at the botto still work)</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-11-27T10:19:08.480Z
Answers.LastActivityDate: 2017-11-27T10:19:08.480Z
Answers.UserDisplayName: Akos Nagy
Answers.Body: <p>You can look at the datasets used for TPC benchmarks. You can find the tools and instructions needed at 
  <a href="http://www.tpc.org/tpc_documents_current_versions/current_specifications5.asp" rel="nofollow noreferrer">http://www.tpc.org/tpc_documents_current_versions/current_specifications5.asp</a> </p>
  
  <p>The advantages of the TPC benchmarks are:</p>
  
  <ol>
  <li><p>The data is generated and loaded by scripts. The schema is also created by SQL scripts (like you have asked). </p></li>
  <li><p>The size of the database you want to create is configurable. </p></li>
  <li><p>The benchmarks are used widely and hence knowledge of their structure and usage will come in handy. </p></li>
  </ol>
  
  <p>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. </p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-11-28T09:14:08.377Z
Answers.LastActivityDate: 2019-11-28T09:14:08.377Z
Answers.UserDisplayName: bkm
Body: <p>I am familiar with the <a href="https://northwinddatabase.codeplex.com/" rel="nofollow noreferrer">Northwind</a> database and <a href="https://github.com/lerocha/chinook-database" rel="nofollow noreferrer">Chinook</a> 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. </p>
  
  <p>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 <a href="https://cseducators.stackexchange.com/questions/1394/good-datasets-for-intro-cs-courses">previous question</a> regarding datasets, which focuses on flat files, or databases available as flat file.</p>
  
Tags: <resource-request><databases>
Title: Toy Databases for Class Examples/Homeworks
ThreadText: # Toy Databases for Class Examples/Homeworks
  
  (Asked by: username_0 on 2017-11-15)
  
  I am familiar with the [Northwind](https://northwinddatabase.codeplex.com/) database and [Chinook](https://github.com/lerocha/chinook-database) 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](https://cseducators.stackexchange.com/questions/1394/good-datasets-for-intro-cs-courses) regarding datasets, which focuses on flat files, or databases available as flat file.
  
  **Tags:** resource-request, databases
  
  
  ---
  
  ## 4 answers
  
  ### Answer by username_1 on 2017-11-16. Score: 4
  
  I stil think this is basically a duplicate of this question: [Good datasets for intro CS courses?](https://cseducators.stackexchange.com/questions/1394/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.
  
  > **Comments:**
  > **username_0**: 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).  
  > **username_1**: @username_0 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.  
  > **username_0**: 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.  
  
  ---
  
  ### Answer by username_2 on 2017-11-16. Score: 2
  
  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,.
  
  
  ---
  
  ### Answer by username_3 on 2017-11-27. Score: 1
  
  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)
  
  
  ---
  
  ### Answer by username_4 on 2019-11-28. Score: 1
  
  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.
  
  
  ---
  
  