2.0: Getting Started with PostgreSQL

One of the flavors of SQL is PostgreSQL, which is used in pgAdmin. The reference docs for PostgreSQL can be found here, and the docs for pgAdmin are located here.

In Part Two, you will create a SQL Library to practice learning the basics of SQL. Rather than giving you step by step instructions, there will be challenges, tips, and requirements for the exercises you need to complete.

After completing Part Two, you should have a better understanding of the following concepts:

  • Writing basic SQL queries in PostgreSQL

  • Creating tables with SQL

  • Inserting seed data

When you are finished, you’ll have a database that looks like this:

NOTE: This image has been truncated to show only relevant files and folders.

You will need to download and install pgAdmin to work with PostgreSQL. Click here for the installation tutorial.

  • Once you have pgAdmin up and running, click on the plus sign next to "Servers." The number next to "Servers" will indicate how many servers you have access to.

  • After you click the plus sign, all of your available servers will be displayed. Use the image below as a guide. Your screen will not look identical because you have different servers on your computer.

  • Click on the server where your database is stored. You may be prompted to enter a password. This is the password you created when you installed pgAdmin.

  • Once you have entered your password, you will have access to the "Databases," "Login/Group Roles," and "Tablespaces" for that server.

  • Click on the plus sign next to "Databases" to view all the databases stored in that server. The number in parentheses next to "Databases" indicates how many databases there are.

  • Right click on the database you want to query. A new menu will pop up. Click on "Query Tool" in that menu.

Use the image below as a guide. It will not be identical to your screen because you will have access to different databases.

Once you've clicked on "Query Tool," the query view will appear on the right side of your screen. This is where you will write your SQL statements.

Please continue to Part 2.1: Create Database.

Last updated