Setup for Introduction to SQL Using PostgreSQL
Required Software
- Windows 10 or later or Mac: OS X (version 10.12) or later.
- Google Chrome
Instructions
Class Files
- The first step to setting up for your course package is to create the folder in which you will store your class files. Create a new folder named Webucator wherever you want, but make sure you remember where it is.
- Download the class files from the bottom of this page.
- Unzip the class files into the Webucator folder. This will create a folder called ClassFiles.
Setup Instructions
- Download the latest version of PostgreSQL. Be sure to choose the version for your operating system.
- Once the installer has downloaded, run it by double-clicking on the download or by right-clicking and selecting Open:
Run through the Setup Wizard. On the Select Components screen, uncheck Stack Builder. Leave the other options checked. Make note of the password you set for the database superuser.
- If pgAdmin doesn’t open automatically, open it.
- Set up a master password. This is how you will log into pgAdmin.
Setting up the jokesdb Database
- Open pgAdmin if it is not already open. You may be prompted to enter your master password.
- Open Servers, right click on Databases, and select Create > Database…
- Name the database “jokesdb” and click Save.
- Right click on jokesdb and select Restore…
- Select the three dots to open a file explorer-like window:
- Navigate to jokesdb.backup file within the setup folder. Make sure that backup is the Format selected or you may not see the file. Click Select.
- Click Restore.
To test if the Restore worked:
- Right click on the jokesdb database, and select Query Tool.
- In the Query Editor, write SELECT * FROM jokes; and then press the Run button.
- In the Data Output, you should see information on various jokes. You should also get a success message that says “595 rows affected”.
If you missed the success message, you can go to Messages:
- Right click on the jokesdb database, and select Query Tool.
- If you have issues with the restore step, it might be a problem with your Binary path. To fix it, do this:
In pgAdmin, open the Query Tool.
And then run
SELECT version()
. You can run it with the Execute button .This should output the version:
Now go to File > Preferences and then open up Binary paths under Paths.
Change the value of PostgreSQL Binary Path to "C:\Program Files\PostgreSQL\[Your version number]\bin" where [Your version number] is the version number (13.1 in the above image). Also check that the folder with that path exists in your file system.
After you do this, try to restore the jokes database again.
Congratulations! You are all set for class.
Courses, Courseware, and Class Files
This setup page is used for the following course and courseware:
Courses
- Introduction to SQL Using PostgreSQL.
- All students should download the following class files:
Courseware
This is for other training companies who are licensing Webucator courseware. If you are a student in a Webucator class, you should use one of the links above or (even better) the class files link on your company landing page or main class page. If you’re not sure, please email support@webucator.com.
- Courseware: Introduction to SQL Using PostgreSQL.