pid and sid are crossed, not nested.  All combinations are possible.
Each observation is a different student. Each student attended a primary school (pid) and a secondary school (sid).
Paterson, L. 1991. "Socio-economic status and education attainment:  A multidimensional and multilevel study" in _Evaluation and Research in Education_ 5: 97-121.