addTeacher method implemented into the db