To use the cloud-based Azure Database for PostgreSQL, create an an account for yourself and then do the following.

  1. Configure a database management instance as specified in the Quickstart tutorial but choosing cheaper, low-performance options — try to get the estimated cost in the right column down to around ~$15/month, which your Azure for Students account can handle for the rest of the semester (and beyond). We suggest setting the following non-default alternatives:

    1. Basics
      • Workload type: Development
      • Compute + Storage
        • Compute tier: Burstable
        • Compute size: Standard B1ms
      • High availability: Disabled
      • Authentication method: PostgreSQL authentication only
      • Remember your administrator login and password.

    2. Networking
      • Allow public access and public access from any Azure service.
      • To run monopolyDirect, add a firewall rule name for your local machine. This is not required for the web service.
    3. Review and create the service.

    To save student credits for future courses, you’ll tear down this database instance at the end of the semester

  2. Create the monopoly database as follows.

    1. There are several ways to “connect” to your database instance, but we suggest the following, simple approach:
      1. Start an Azure Cloud Shell session by clicking on the Cloud Shell icon on the top bar of the Azure portal.
      2. Go to the database instances’s SettingsConnect→Connection details, and cut/paste the export commands (with your password edited in) into your cloud shell session.
      3. Then run psql in the cloud shell session.
      This gives you BASH/PSQL command-line access to your database. You can find details under the “Get the connection information” CLI tab.
    2. Cut/paste the contents of this SQL command file into the cloud shell session. This builds the monopoly database from scratch.

    3. You can test the database by running this simple query:
      SELECT * FROM Player;
      which should return three monopoly player records.

    You should now be set to continue with the lab exercises.

You could consider using the VS Code PostgreSQL extension to connect to your database, which allows you to work with your database locally, within VScode.