courses table

The courses table in the Learning Management System Database Schema schema has 15 columns, keyed by id, with 1 foreign key to course_categories. 8 columns in user_roles, course_instructors, modules, cohorts and 4 more reference it.

The course is the syllabus, not a run of it. Dates and enrolment live on cohorts, so the same course can run every term.

Columns (15)

Columns of the courses table
ColumnTypeConstraintsDescription
iduuidprimary key
category_iduuidreferences course_categories.id
codevarchar(40)unique, not null
titlevarchar(255)not null
slugvarchar(280)unique, not null
summaryvarchar(500)
descriptiontext
levelcourse_levelnot null
statuscourse_statusnot null
languagechar(2)
estimated_hourssmallint
price_centsinteger
currencychar(3)
published_attimestamptz
created_attimestamptznot null

Indexes (2)

  • (status, published_at)
  • (category_id, status)

Relationships