MySQL Forums
Forum List  »  Newbie

Re: Table Schema - Inner Joins
Posted by: Peter Brawley
Date: January 12, 2022 04:03PM

Grandparent FKs are redundant, invite skew, don't do it! See 4a...4e in https://www.artfulsoftware.com/dbdesignbasics.html, you seem to need ...

users( uid int unsigned primary key, ... )

cases( cid int unsigned primary key, uid int unsigned, foreign key(uid) references users(uid), ... )

supplements( sid int unsigned primary key, cid int unsigned, foreign key( cid) references cases(cid), ... )



Edited 1 time(s). Last edit at 01/12/2022 04:14PM by Peter Brawley.

Options: ReplyQuote


Subject
Written By
Posted
January 12, 2022 02:53PM
Re: Table Schema - Inner Joins
January 12, 2022 04:03PM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.