rewritten schools db structure and programming logic