This is a sample database available for SQL Server, Oracle and MySQL. It can be created by running a single SQL script. You can see the Chinook database schema
here.
The zip file above contains SQL scripts and batch files for each database supported. It also contains the data in XML format, see
SampleData\ChinookData.xml, and a SQL Server Compact database
SampleData\Chinook.sdf.
What is new?
- Support for SQL Server Compact.
- Additional customers from multiple countries.
- Added a many-to-many relationship (a Playlist contains many Tracks, a Track belongs to many Playlists).
- Added a one-to-many relationship between Employee and Customer (support representative).
- Added Total field to invoice table.
Supported Database Servers
- MySQL
- Oracle
- SQL Server
- SQL Server Compact
How do I Create the Chinook Database?
Download and extract the zip file above. Under the
Script folder, there are two files per database server: a SQL script,
CreateDB.sql, and a batch file,
CreateDB.bat. You can either run the SQL script by using your preferred database tool or run the provided batch file.
The batch files use the database server command tool (
mysql.exe for MySQL,
sqlcmd.exe for SQL Server, and
sqlplus.exe for Oracle). If you are using Windows Vista, it is recommended to open a Command Prompt window as Administrator in order to run these batch files.
For SQL Server Compact, we included the compact database
SampleData\Chinook.sdf. If you prefer to create your own compact database, then you can use its
CreateTables.sqlce script.
Notes for MySQL Version
- The provided script was tested using MySQL Server 5.1.
- The CreateDB.bat file uses the localhost server, and the root user with the password p4ssw0rd. Change this file to match your settings before running it.
Notes for Oracle Version
- The provided script was tested using Oracle Database 10g Express Edition (XE).
- The CreateDB.sql creates a new user chinook, with the password p4ssw0rd. Change this script if you want a different user/password.
Notes for SQL Server Version
Notes for SQL Server Compact Version