Linking to the correct table in a Foreign Relationship
Suppose I have these tables: User(roles=admin,teacher, student), StudentProfile, TeacherProfile, Course, Enrollment, Scholarship etc. The User table has auth stuff like first_name, last_name, password, email etc. (using Django framework). You can already guess this is an LMS platform.
A student user can enroll for a course. Now should the Enrollment link the StudentProfile table or the User table? I was vibe coding with Claude free, and I now realized that it connected everything to the User table. Although to me logically it seems a student can enroll for a course, so the enrollment should be linked to student profile, right? the argument presented by Claude is that it is easier to lookup without requiring complex joins.