Chinook is a sample database available for SQL Server, Oracle, MySQL, etc. It can be created by running a single SQL script. Chinook database is an alternative to the Northwind database, being ideal for demos and testing ORM tools targeting single and multiple database servers.
- DB2
- MySQL
- Oracle
- PostgreSQL
- SQL Server
- SQL Server Compact
- SQLite
Download the SQL scripts from the latest release assets. One or more SQL script files are provided for each database vendor supported. You can run these SQL scripts with your preferred database tool.
The Chinook data model represents a digital media store, including tables for artists, albums, media tracks, invoices and customers.
![image](https://private-user-images.githubusercontent.com/135025/299867754-cea7a05a-5c36-40cd-84c7-488307a123f4.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ3MDM5MjIsIm5iZiI6MTcyNDcwMzYyMiwicGF0aCI6Ii8xMzUwMjUvMjk5ODY3NzU0LWNlYTdhMDVhLTVjMzYtNDBjZC04NGM3LTQ4ODMwN2ExMjNmNC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODI2JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgyNlQyMDIwMjJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT00M2EwZjM1ZmIyM2Y2MTRhNDNiN2ZkYmQ0YWNmNjYxMzllNTBmOGFiZTRiNzY4ZTRhNmMzOGVkM2ZhYzUxYzFkJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.cJiqz4FuhCXuzCyhLpRMrtDpq2tfUKavk8ogICwvCvw)
Media related data was created using real data from an iTunes Library. It is possible for you to use your own iTunes Library to generate the SQL scripts, see instructions below. Customer and employee information was manually created using fictitious names, addresses that can be located on Google maps, and other well formatted data (phone, fax, email, etc.). Sales information is auto generated using random data for a four year period.
The name of this sample database was based on the Northwind database. Chinooks are winds in the interior West of North America, where the Canadian Prairies and Great Plains meet various mountain ranges. Chinooks are most prevalent over southern Alberta in Canada. Chinook is a good name choice for a database that intents to be an alternative to Northwind.
System Requirements:
- Visual Studio 2022 Community Edition (make sure to select
Visual Studio extension development
with theText Template Transformation
option during installation) - .NET 8
Notes:
- The SQL scripts are auto-generated using Text Template Transformation.
- The
ChinookDataSet.xsd
file contains the schema definition,ChinookData.json
contains the data, and the*.tt
files are the text templates that are used to generate all SQL scripts. - You can build the solution using any IDE (Visual Studio, Rider) or using
dotnet build
in any OS since I just migrated it to .NET 8, but to auto-generate the SQL scripts we still need Visual Studio. I will update here once I find a good way to auto-generate the scripts by using tools like dotnet-t4.