I have the following tables in my database
- students
- teachers
- address
I Want to store basic information about students and teacher in its own table, but the address and contact information in address table. If I store the student_id
or teacher_id
in address table, the student might have same id
as any teacher. If I try to query any teacher address by teacher_id
. It will query the student who has the same id
as well.
So what the best way to figure out this problem? should I create any other table as well or ....
Please suggest me an easiest and best approach.
thanks.