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, 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

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

This forum is currently read only. You can not log in or make any changes. This is a temporary situation.

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.