MySQL Forums
Forum List  »  Newbie

Re: Inserting data into related tables
Posted by: Phillip Ward
Date: September 07, 2022 05:03AM

The only data that should "go" from User to Order is the userID.
Leave everything else (like the user's Name) in the User table and join to the Users table, using the userID, as and when you need that extra data.

Duplicating data from one table to another is a big "No-No" in Relational Databases. You ideally want a single source of Truth for each piece of data.

Regards, Phill W.

Options: ReplyQuote

Written By
September 06, 2022 11:02PM
Re: Inserting data into related tables
September 07, 2022 05:03AM

Sorry, you can't reply to this topic. It has been closed.

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.