I suggest turning this around. Note how similar your fields are for teachers and trainees. They are almost identical. You can put teachers and trainees in the same table using the same ID serial number for both. The specialty field would just be left blank for Trainees and you'd add a new field where you'd designate a given record as either the record of a "Teacher" or a "Trainee".
Given that added field, you can use a variety of methods to make sure you are only working with teachers or only working with trainees in situations where that is important, but can pull records for both together on the same layout when you need to work with both at the same time.