Quantcast
Channel: Relationships in a school database - Database Administrators Stack Exchange
Viewing all articles
Browse latest Browse all 3

Answer by FrustratedWithFormsDesigner for Relationships in a school database

$
0
0

You might need an intermediate table to store this relationship, as it's possible that a student has more than one parent/gaurdian (a mother and a father) and it's possible that a parent/gaurdian has more than on student.

student-------  idgaurdian--------  idstudent_gaurdian----------------  student_id  gaurdian_id

The table student_gaurdian can store all the relations between students and gaurdians, and allows many-to-many relations.


RE: your new question

Having two tables with keys to each other looks a little weird to me, but if you really are having performance problems and this relieves them, then it's fine.


Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>