/
🍃 Database Format - CSElectives 2.0

🍃 Database Format - CSElectives 2.0

TODO: redesign this

Currently, only courses that fall under the School of Computer Science and Engineering are stored in the database.

Data from all UNSW courses 2022 is in the coursesFormattedRaw.json file in the branch ELEC-91: https://github.com/csesoc/CSElectives/blob/ELEC-91-insert-data-into-firestore-DO-NOT-MERGE/src/assets/coursesFormattedRaw.json. We can use them later if we or the Circles team wish to expand the scope of the review website.

Custom Types

A Code type used in this documentation refers to a string in format of /[A-Z]{4}[0-9]{4}/, e.g. COMP1511

A YearTerm type refers to a string in format of /[0-9]{2}T[0-3]/, e.g. 21T1

Course

A course object contains all required metadata concerning the course. The format is as follows:

Key

Description

Type

Example

Key

Description

Type

Example

attributes

A courses attributes (related to if it’s an introductory course, or general education course, etc.)

[Attribute]

See Attributes

calendar

Denotes whether part of semester or trimester calendar.

string

'3+'

campus

Location of UNSW campus (includes Sydney, Paddington and Canberra)

string

'Sydney'

courseCode

Course code

Code

'COMP2521'

description

Description from Handbook

string

'...'

enrolmentRules

Required prerequisites. Empty string if none.

string

'Prerequisite: COMP1511 or DPST1091 or COMP1911 or COMP1917'

equivalents

An object with equivalent courses as the key. Value is always 1.

{ [code: Code]: 1}

{ DPST1092: 1}

exclusions

An object with equivalent courses as the key. Value is always 1.

{ [code: Code]: 1}

{ DPST1092: 1}

faculty

The faculty responsible for teaching the course.

string

'Faculty of Engineering'

fieldOfEducation

Category of learning

string

'031305 Computer Engineering'

genEd

A flag that indicates whether the course can be taken as a general education course

boolean

true

level

The first number of the course’s course code

number

1

reviews

An array of review ids submitted by our users.

[string]

['abcd123', 'zyx987']

school

The school responsible for teaching the course. A school is a subdivision of a faculty.

This is an empty string if the responsible school could not be found (e.g. the faculty itself is responsible for the course)

string

School of Computer Science and Engineering

studyLevel

Represents whether the course is for undergraduate or postgraduate students

string

Undergraduate

terms

An array representing the course availability per term.

0 represents Summer Term; 1 represents Term 1, etc.

[number]

[0, 1, 2, 3]

title

Name of course

string

Data Structures & Algorithms

uoc

A course’s units of credit

number

6

Review

Key

Description

Type

Example

Key

Description

Type

Example

author

Author of review. Currently the substring before the @ in their provided emails, later on we’ll probably be storing zid’s

string

z5555555

john.doe

comment

Author’s review

string

'...'

courseCode

The course code

Code

COMP1511

displayAuthor

False if the review is to be shown anonymous.

boolean

false

id

id for review

string

'abcd123'

rating

Their ratings for the course

Rating

{ difficulty: 5, enjoyment: 5, overall: 5, usefulness: 3, workload: 5, }

recommendedCourses

A list of recommended courses

[Code]

[ ‘COMP2041’ ]

termTaken

The term they took the course

YearTerm

'20T2'

timestamp

Timestamp (unix timestamp) in milliseconds

number

1627211775000

Rating

All ratings are integers between 1 and 5 inclusive.

Key

Type

Example

Key

Type

Example

difficulty

number

1

enjoyment

number

2

overall

number

3

usefulness

number

4

workload

number

5

Attribute

I’ve only seen introductory_course and general_education attributes.

Key

Type

Example

Key

Type

Example

description

string

'This course is usually taken in the early part of a program and may be required as a pre-requisite before taking a more advanced course.'

type

string

'introductory_course'

Related content