SQLServerCentral Article

SQL Server Sample Databases

,

Northwind, Pubs, Aventureworks, AdventureworksDW, WideWordImporters, etc are important sample databases used in SQL Server. In this article, we will explain these databases and help you to find them, install them and understand them. Also, you will understand the differences between them and each version and type.

Requirements to install SQL Server Sample Databases

First, you need to have SQL Server installed.

Secondly, it is necessary to have SSMS installed.

Pubs and Northwind SQL Server sample databases

A looooooooooooooooooooong time ago, we had SQL Server 2000. The installer used to include 2 SQL Server Sample Databases:

  • First, we have northwind. This is a sample database with customers, employees, orders, products, and suppliers.
  • Secondly, we have pubs. Pubs contain fictitious information about books, authors, publishers, sales, stores, and titles.

These databases used to be included in the SQL Server 2000 installer. Now, you can find it on GitHub at the following URL: https://github.com/microsoft/sql-server-samples/tree/master/samples/databases/northwind-pubs

You will have 2 scripts:

SQL Server Sample Databases - Northwind

We have the Instwnd.sql file which is the northwind installer. The instpubs.sql will install the pub's database.

How to install pubs and Northwind SQL Server sample databases

First, click on the file and press download.

download northwind database

Secondly, check the code of the sql file. You will see code to create tables and objects and insert data.

Thirdly, execute the T-SQL code in SSMS. The code creates the object and inserts data.

SQL Server Sample Databases - execute script

Finally, you can check the tables, views, stored procedures, etc.

SQL Server Sample Databases - show northwind tables

Also, you can apply the same steps to install pubs. In addition, you need to run the instpubs.sql code to create the pubs database.

SQL Server Sample Databases - Pubs tables

Adventureworks SQL Server sample databases

Adventureworks is a fictitious company. It is an international company that produces and distributes bikes in North America, Europe, Asia, and Australia. This database used to be included in the installer of SQL 2005 and then it was distributed separately. The database was in CodePlex, but this site was shut down in 2017. Now the Adventureworks sample databases are stored in GitHub.

We have basically 3 main databases:

Name

Description

Adventureworks[version]First, we have this database which is the most popular one used to learn T-SQL, stored procedures, views, etc. The Microsoft SQL Server documentation uses this database for its examples.
AdventureworksLT[version]Secondly, we have this database which is a Lightweight version. Use this version, if you do not have too much space in your hard drive. Or you do not want to install too many objects.
AdventureworksDW[version]Finally, we have the Datawarehouse version which is used for Analysis Services and Tabular models.

Also, we have the following URL shows how to install these databases in SQL Server: AdventureWorks sample databases

The versions are related to the SQL Server versions (SQL Server 2008, 2012, 2014, 2016, 2017, and 2019).

AdventurewoksDW projects

There are some projects that use the AdventurewoksDW database. For example, we have the SSAS multidimensional project which contains a multidimensional model using the AdventureworksDW data.

Adventureworks multidimensional model

In order to download the project and install it, go to the following link: Install sample data and multidimensional projects

The WideWorldImporters SQL Server sample databases

Finally, we have the Wide Word Importers starting in SQL Server 2016. This is a fictitious company. WWI is a novelty goods importer and distributor.

For more information about the company, you can check the following link related: Wide World Importers sample databases for Microsoft SQL

There are several versions of this database. You can find the backups or Bacpac files in GitHub: Wide World Importers sample database v1.0

The full database shows all the features while the Standard database includes features for the SQL Server Standard edition only. The bak file is for databases on-premises while the Bacpac files are for SQL Servers on-premises or in Azure.

Also, we have the WorldWideImportersDW database which is a sample database for Datawarehouse scenarios. We also have the standard and full version of databases here.

Conclusion

To conclude, we learned the different sample databases in SQL Server. We learned about the old Pubs and Northwind databases. In addition, we learned about the different types of Adventureworks databases and finally, we explained the different types of WorldWideImportersDW databases.

Rate

4.5 (4)

You rated this post out of 5. Change rating

Share

Share

Rate

4.5 (4)

You rated this post out of 5. Change rating