You can access an installation of PostgreSQL
via a command line or GUI interface.
Both are explained on http://www.cat.pdx.edu/web/database-services.html.
On that page you can also learn how to get your own Postgres
database on the CECS server. But you can
use the Library, Spy, and Sailors database using the account shown below; you
do not need your own account for the first three assignments.
In order to access the shared copies of the databases that we will all use,
there are a few changes to those directions.
To get past the first page of the
GUI, click on “Database Class” shown in the left navigation panel.
Enter the user introdb_readonly
with password introdb
and then click Login
You will see three databases shown in the left
navigation panel: introdb_library, introdb_sailors, introdb_spy. Expand the database name, then expand
“Schemas”, then click on “public”. This
will show you the tables in the database.
If you click on the “Browse” action, you will see the rows (i.e., the
data) in a table. If you click on the
table name (e.g., “boats” in the introdb_sailors
database), you’ll see the description of the schema for that table.
To enter an SQL query, click on the “SQL” choice shown in the upper right
corner of the page. You’ll see a window
where you can type in an SQL query.
Click “Execute”; the query answer will be shown in the other window –
where you started working with pgadmin.
Remember: don’t put a semicolon (;) at the end of your query when using pgadmin.