Skip to content

1.3 Database

martin-stierlen edited this page Mar 10, 2026 · 6 revisions

What you will find on this page 🦉

  • Schema - UML diagram depicting the database schema and it's relations
  • Models - all tables described in detail
  • Enums - all enumerations with their possible values

Schema

Database Table Schema

Models

table sessions

Column Type Notes
id UUID PK auto-generated
topic String learning topic entered by student
priorKnowledge String? optional keywords
learningGoal String selected or custom goal
learningGoalBloomsLevel BloomsLevel Bloom's level of the goal
totalBlocks Int >= 1
currentBlockIndex Int >= 0, < totalBlocks
userFeedback Int? 1–5 star rating, nullable
startedAt DateTime auto now()
completedAt DateTime? set when session ends

table blocks

Column Type Notes
id UUID PK
sessionId UUID FK → sessions CASCADE delete
orderIndex Int >= 0
alreadyViewed Boolean default false
type BlockType discriminates the sub-type

table inform_blocks

Column Type Notes
blockId UUID PK/FK → blocks
messages InformBlockMessage[] ordered chat history

table inform_block_messages

Column Type Notes
id UUID PK
informBlockId UUID FK
message String
sender MessageSender User or Owlbert
timestamp DateTime auto now()

table practice_blocks

Column Type Notes
blockId UUID PK/FK → blocks
soloLevel SoloLevel SOLO difficulty level
question String
answerOptions String[] exactly 4 options
correctAnswerOptionIndices Int[] subset of [0,1,2,3], min 1
studentAnswerOptionIndices Int[] subset of [0,1,2,3]
studentAnswerIsCorrect Boolean? set after submission

table summary_blocks

Column Type Notes
blockId UUID PK/FK → blocks
sessionSummary String AI-generated session recap

Enums

Enum Values
BloomsLevel Remember, Understand, Apply, Analyze, Evaluate, Create
SoloLevel Unistructural, Multistructural, Relational, ExtendedAbstract
BlockType Inform, Practice, Summary
MessageSender User, Owlbert

Owlbert

ExplAIner Wiki

Simply click here to checkout ExplAIner yourself! 🦉

Welcome

System Architecture

Contributor Guide

Clone this wiki locally