database/schema library
Database schema definitions for Tattoo.
This file defines the complete database structure for storing:
- User accounts and student profiles
- Course catalog and semester offerings
- Class schedules and time slots
- Teachers, classrooms, and class (系級) information
- Student enrollments and course materials
The schema is designed to support offline-first operation with periodic sync from NTUT's various web services (Portal, CourseService, I-School Plus).
Classes
- Classes
- Student class/major (系級) in a particular semester.
- Classrooms
- Classroom/location information in a particular semester.
- CourseOfferingClasses
- Junction table linking course offerings to the classes they're intended for.
- CourseOfferingClassrooms
- Junction table linking course offerings to their classrooms.
- CourseOfferings
- Specific offering of a course in a particular semester.
- CourseOfferingStudents
- Junction table linking course offerings to enrolled students.
- CourseOfferingTeachers
- Junction table linking course offerings to their instructors.
- Courses
- Course catalog information.
- Departments
- Academic department information.
- Materials
- Course materials and resources.
- Schedules
- Class schedule time slots for course offerings.
- Scores
- Per-course score entry from the student query system (學業成績查詢).
- Semesters
- Academic semester information.
- Students
- Student seen in an I-School Plus course roster.
- TeacherOfficeHours
- Teacher office hours time slots.
- Teachers
- Teacher/instructor information for a particular semester.
- Users
- Authenticated user's account and profile from the NTUT portal.
- UserSemesterRankings
- Grade ranking data for the user in a semester at a given scope.
- UserSemesterSummaries
- Per-user per-semester academic summary from the student query system.
- UserSemesterSummaryCadreRoles
- Class cadre roles held by the user in a semester.
- UserSemesterSummaryTutors
- Junction table linking user semester summaries to their tutors.
Mixins
- AutoIncrementId
- Mixin for tables that use an auto-incrementing integer primary key.
- Fetchable
- Mixin for tables that support incremental data fetching.