Here is the situation:
I got a database which record the relationship between CUSTOMER and ORDER, INVOICE, PAYMENT etc.
My current design is: CUSTOMER links to ORDER, ORDER links to INVOICE, and INVOICE links to PAYMENT.
My question is, I actually want to know which CUSTOMER is dealing with the ORDER, the INVOICE and the PAYMENT. So do I have to put the CUSTOMER_ID in every table which I want to show the CUSTOMER in as a FK? Will it
Or I can just present it by query?
No, you don’t. You should just write a query with multiple joins, if you aim to follow proper database design and avoid redundant data storage.
E.g.: