Connecting to Vagrant DB Locally
The Vagrant VM sets up PostgreSQL such that you can access it from
within the VM as well as from outside it for ease of development. When
you start Vagrant, it will map the port 5432 inside the VM to the port
16442 outside the VM. You can then connect by specifying localhost for
the host and then submitty_${SEMESTER}_${COURSE}
(replacing
${SEMESTER}
and ${COURSE}
with the actual one you want) for the DB
to connect to. The user and password are both submitty_dbuser
. All tables are then
located in the public
schema.
We recommend that to connect to the DB that you use one of the following options ranging from simplest to most powerful.
-
psql (CLI for connecting to PostgreSQL)
-
pgAdmin (GUI for connecting to PostgreSQL)
-
navicat (GUI for managing PostgreSQL)
-
DataGrip (“Database IDE”, can connect to most DB types)
Note: When adding a new server to pgAdmin, change the following parameters in the
server’s Connection
settings:
Host name/address
:localhost
Port
:16442
Username
:submitty_dbuser
Password
:submitty_dbuser
You do not need to change the port or the maintenance database - the port should say 5432
and the maintenance database should say postgres
by default.
Entity-Relation Diagrams
-
Submitty Database (updated 2019-06-05, see code for most recent):
-
Courses Tables (updated 2019-06-05, see code for most recent):
Diagram generated using DataGrip, by
connecting to the DB, right-clicking on public
schema,
Diagrams > Show Visualization…