Project: Okul Database · Hub: Okul Database — Reference
Reference: schools_types Table
Used in schools.school_type_id and school_filters.school_type_id.
Values
| id | type (name) | plural_name | slug | Approx. age range |
|---|---|---|---|---|
| 1 | Anaokulu | Anaokulları | anaokulu | Ages 3–6 (Kindergarten) |
| 2 | İlkokul | İlkokulları | ilkokul | Grades 1–4 (Primary) |
| 3 | Ortaokul | Ortaokulları | ortaokul | Grades 5–8 (Middle School) |
| 4 | Lise | Liseleri | lise | Grades 9–12 (High School) |
Note: Universities and colleges are separate entities (
universities,collegestables) and do NOT appear here.
Sector × Type Combinations
Common combinations in practice:
- Private Kindergarten:
sector_id=2, school_type_id=1 - Public Primary:
sector_id=1, school_type_id=2 - Private High School:
sector_id=2, school_type_id=4
Usage
-- Private high schools count by city
SELECT sf.city_name, COUNT(*) as count
FROM school_filters sf
WHERE sf.sector_id = 2
AND sf.school_type_id = 4
AND sf.deleted_at IS NULL
GROUP BY sf.city_id, sf.city_name
ORDER BY count DESC;
-- school_filters.school_type_name already contains the name (no join needed)Related
- ref-sectors — sector_id values
- table-school-filters — denormalized school_type_name
- table-schools — schools.school_type_id FK