Project: Okul Database · Hub: Okul Database — Reference

Reference: schools_types Table

Used in schools.school_type_id and school_filters.school_type_id.

Values

idtype (name)plural_nameslugApprox. age range
1AnaokuluAnaokullarıanaokuluAges 3–6 (Kindergarten)
2İlkokulİlkokullarıilkokulGrades 1–4 (Primary)
3OrtaokulOrtaokullarıortaokulGrades 5–8 (Middle School)
4LiseLiseleriliseGrades 9–12 (High School)

Note: Universities and colleges are separate entities (universities, colleges tables) 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)