-
Notifications
You must be signed in to change notification settings - Fork 0
Compass Database Tables
Documentation last updated 11/2/23 targting database migration rev 0012.
The Compass v2 database is a PostgreSQL 13 database, connections can be made from the command line psql client or any number of other database clients, some examples below. Connections must come from an UW IP, either through a workstation located on campus or via the Husky OnNet VPN client.
psql is a terminal-based front-end to PostgreSQL.
psql -h [database IP address] -U [username] -d compass-prod
DBeaver is free and open source universal database tool for developers and database administrators. Windows, Mac OS X, and Linux are supported.
- Add a new database connection (Database > New Database Connection)
- Select PostgreSQL
- Enter the database configuration
Connect by: Host
Host: [database IP address]
Database: compass-prod
Port: 5432
Authentication: Database Native
Username: [username]
Password: [password]
- Click Finish
- Install the latest psqlodbc drivers
- Open the Windows ODBC Data Source Administrator tool
- Under User DSN click Add
- Select PostgreSQL Unicode
- Enter the database configuration
Data Source: [name this data source]
Server: [database IP address]
Database: compass-prod
Port: 5432
User Name: [username]
Password: [password]
- Click OK
- In Microsoft Access navigate to the External Data ribbon and select New Data Source > From Other Sources > ODBC Source
- Select "Link to the data source by creating a linked table"
- Under the Machine Data Source tab select the data source you created above and select OK
- Select all of the public.compass_* tables and click OK
- You should see the linked tables appear under All Access Objects and be able to access their data
- compass_accessgroup
- compass_affiliation
- compass_appuser
- compass_cohort
- compass_contact
- compass_contact_access_group
- compass_contact_contact_topics
- compass_contactmethod
- compass_contacttopic
- compass_contacttype
- compass_eligibilitytype
- compass_student
- compass_studentaffiliation
- compass_studentaffiliation_cohorts
- compass_studenteligibility
- compass_studenteligibility_eligibility
- compass_visit
- compass_visittype
AccessGroups manage their Affiliation, ContactTopic, ContactType, and ContactMethod lists. AccessGroup membership is defined externally in UW groups (Astra) and determined for a AppUser at login. Access groups for the app are created in the Django Admin. The access_group_id is the prefix of the uw-groups (user and manger) that it is affiliated with.
Column | Type | Notes |
---|---|---|
id | integer | |
name | character varying(50) | |
access_group_id | character varying(50) |
Departmental/Group Affiliation (e.g. CAMP, TRIO, SSS, Champions, IC Eligible)
Column | Type | Notes |
---|---|---|
id | integer | |
name | character varying(50) | |
slug | character varying(50) | |
active | boolean | |
editable | boolean | |
access_group_id | integer | Foreign key to compass_accessgroup |
User of the app that content, such as contacts, is associated with.
Column | Type | Notes |
---|---|---|
id | integer | |
uwnetid | character varying(50) |
Cohort to which a student can be assigned.
Column | Type | Notes |
---|---|---|
id | integer | |
start_year | smallint | |
end_year | smallint |
A contact/appointment with a student. For OMAD contacts are generated via the automated check-in system and updated by advisers, or created manually by advisers.
Column | Type | Notes |
---|---|---|
id | integer | |
noshow | boolean | |
notes | text | |
actions | text | |
source | character varying(50) | |
created_date | timestamp with time zone | |
app_user_id | integer | Foreign key to compass_appuser |
contact_type_id | integer | Foreign key to compass_contacttype |
student_id | integer | Foreign key to compass_student |
checkin_date | timestamp with time zone | |
contact_method_id | integer | Foreign key to compass_contactmethod |
Bridge table between compass_contact and compass_accessgroup
Column | Type | Notes |
---|---|---|
id | integer | |
contact_id | integer | Foreign key to compass_contact |
accessgroup_id | integer | Foreign key to compass_accessgroup |
Bridge table between compass_contact and compass_contacttopic
Column | Type | Notes |
---|---|---|
id | integer | |
contact_id | integer | Foreign key to compass_contact |
contacttopic_id | integer | Foreign key to compass_contacttopic |
The method used in the contact. These are created for a given access group by the access group managers. Examples include Telephone, In-Person, and Video Conference.
Column | Type | Notes |
---|---|---|
id | integer | |
name | character varying(50) | |
slug | character varying(50) | |
active | boolean | |
editable | boolean | |
access_group_id | integer | Foreign key to compass_accessgroup |
Topics discussed with a student. These are created for a given access group by the access group managers. Examples include Add/Drop Class, Join/Affiliate, Academic Difficulties, Hardship Withdrawl, Internships, Research Opportunities, Graduate Professional School, and Testing/Assessment.
Column | Type | Notes |
---|---|---|
id | integer | |
name | character varying(50) | |
slug | character varying(50) | |
active | boolean | |
editable | boolean | |
access_group_id | integer | Foreign key to compass_accessgroup |
Type of contact with a student. These are created for a given access group by the access group managers. Examples include Quick Question, Appointment, and Workshop.
Column | Type | Notes |
---|---|---|
id | integer | |
name | character varying(50) | |
slug | character varying(50) | |
active | boolean | |
editable | boolean | |
access_group_id | integer | Foreign key to compass_accessgroup |
A service or resource that is available to students
Column | Type | Notes |
---|---|---|
id | integer | |
name | character varying(50) | |
slug | character varying(50) | |
editable | boolean | |
access_group_id | integer | Foreign key to compass_accessgroup |
The student model is used to associate app data to a student. In this app only system_key is stored as it provides a unique key that is used to request student information from the PDS. Besides system-key, no student information is ever stored in the app, all student data is fetched directly from the PDS since it is kept up to date via automated jobs.
Column | Type | Notes |
---|---|---|
id | integer | |
system_key | character varying(50) |
Affiliation assigned to a student
Column | Type | Notes |
---|---|---|
id | integer | |
date | date | |
actively_advised | boolean | |
affiliation_id | integer | Foreign key to compass_affiliation |
student_id | integer | Foreign key to compass_student |
Bridge table between compass_cohort and compass_studentaffiliation
Column | Type | Notes |
---|---|---|
id | integer | |
studentaffiliation_id | integer | Foreign key to compass_studentaffiliation |
cohort_id | integer | Foreign key to compass_cohort |
Services and resources for which a Student is provided access
Column | Type | Notes |
---|---|---|
id | integer | |
student_id | integer | Foreign key to compass_student |
Bridge table linking compass_studenteligibility to compass_eligibilitytype
Column | Type | Notes |
---|---|---|
id | integer | |
studenteligibility_id | integer | Foreign key to compass_studenteligibility |
eligibilitytype_id | integer | Foreign key to compass_eligibilitytype |
Student interaction with service
Column | Type | Notes |
---|---|---|
id | integer | |
course_code | character varying(64) | |
checkin_date | timestamp with time zone | |
checkout_date | timestamp with time zone | |
access_group_id | integer | Foreign key to compass_accessgroup |
student_id | integer | Foreign key to compass_student |
visit_type_id | integer | Foreign key to compass_visittype |
Type of student visit. These are created for a given access group by the access group managers. Examples include IC Drop-In Tutoring and and IC Workshop.
Column | Type | Notes |
---|---|---|
id | integer | |
name | character varying(50) | |
slug | character varying(50) | |
editable | boolean | |
access_group_id | integer | Foreign key to compass_accessgroup |