Schema Reference
18 tables modeled after a real Student Information System. ods_person is the central hub — every student, faculty member, and applicant starts there.
Foreign Keys by Area
Columns With NULLs
These are sparse on purpose — real SIS data is. An inner join, a WHERE, or COUNT(column) on any of them drops the NULL rows without an error, so check the shape before you trust a total. Use COUNT(*) to count rows, and AVG() already ignores NULLs.
| Column | NULL rows | Why |
|---|---|---|
| ods_applications.appl_hs_gpa | 29 of 200 | Transfer and returning applicants often have no HS GPA |
| ods_applications.appl_hs_class_rank_pct | 41 of 200 | Many high schools no longer report class rank |
| ods_applications.appl_sat_total | 68 of 200 | Test-optional applicants |
| ods_applications.appl_act_composite | 105 of 200 | Most applicants submit SAT or ACT, not both |
| ods_person.first_gen_ind | 14 of 220 | Declined to state — not the same as N |
| ods_person.middle_name | 136 of 220 | |
| ods_faculty.fac_special_status | 34 of 35 | Only set for the exceptions |
Entirely NULL — every row, so there is nothing to select:
ods_acad_programs.acpg_end_date · ods_courses.crs_end_date · ods_advisor_assignments.saa_end_date · ods_stu_acad_levels.stpr_end_date · ods_address.addr_line2 · ods_address.addr_effective_end
Common Join Patterns
Student full name
SELECT p.id, p.first_name, p.last_name FROM ods_person p JOIN ods_students s ON s.students_id = p.id
Faculty headcount by department
SELECT d.dept_desc, COUNT(*) AS faculty_count FROM ods_faculty f JOIN ods_departments d ON d.departments_id = f.fac_dept GROUP BY d.dept_desc ORDER BY faculty_count DESC
Applicants with a reported SAT
SELECT AVG(appl_sat_total) AS avg_sat,
COUNT(appl_sat_total) AS reported,
COUNT(*) AS applicants
FROM ods_applicationsEnrollments with grades
SELECT p.first_name, p.last_name,
cs.scs_course_name, cs.scs_final_grade
FROM ods_stu_course_sec cs
JOIN ods_person p ON p.id = cs.scs_student
WHERE cs.scs_status = 'A'dbo schema · 18 tables
PostgreSQL