Loading the Northwinds Database Into PostgreSQL with DBeaver

 Note: I am presenting a tutorial for those who want to learn SQL at this year's Texas Linuxfest (https://pretalx.com/txlf2026/talk/DQ3XW7/) on November 6th.  This is a great opportunity at a fantastic community event and I encourage you to attend.


Demo databases are good way to develop skills with Structured Query Language. Some are associate with one data store more than another, like Sakila and World with MySQL, or DVD with PostgreSQL. The Northwind database originated in the Microsoft sphere of influence but it is easy to obtain for PostgreSQL.

Step 1

Go to https://github.com/pthom/northwind_psql and download https://github.com/pthom/northwind_psql/blob/master/northwind.sql

This file has all you need.


Step 2

I am using DBeaver Enterprise Edition 26.1.0 and open the northwind.sql file. DBeaver is an amazing data tool and makes this type of project simple. 

Opening the northwind.sql file








Step 3

This is that northwind.sql file in all its glory. If you are new to SQL, take a moment and scroll through the file. This is a well structed example that you could use to model your future work (hint, hint).

The contents of the northwind.sql file












Step 4

Now we can execute the northwind.sql file to load the structure and data. 

Use Alt + X to execute the northwind.sql file



Step 5

How did it go? Did it load properly. If it did, you should see something like the following report on the script's execution. 












Step 6

Try a sample query! What, you're new to SQL and don't have a sample handy? Try this:

SELECT customer_id, company_name , city, country

FROM customers

WHERE country = 'Germany';


This query will ask for four columns of data from the table named 'customers'.




The results















Conclusion

This has been a quick example of how to load the Northwinds database into PostgreSQL. 

I will not be using this database in Austin to TXLF, but I may tangentially mention it for those seeking more schemas to worth with.


Comments

Popular posts from this blog

How PostgreSQL's Aggregate FILTER Will Spoil You

Is the future of MySQL PostgreSQL (Or MariaDB, or TiDB, or ...)?

PostgreSQL 18 Old & New