0

Let’s say I have two tables table 1 has columns name, date of birth, zip code, "random stuff"

Table 2 has 3 columns. Income, "random stuff", education.

If we just do an inner join we would could do

Select *
From table 1
Join Table 2
USING (random stuff)

and we are all happy right?

Okay, how do I show this on an ER diagram. And when I say this, I do not mean how do I make a table 1 and table 2 on an ER diagram. How can I make table 3 on an ER diagram showing that we used "random stuff" to join Table 1 and Table 2?

Or is this not what an ER diagram is used for?

Also random stuff is not a primary key since there can be multiple exact values of this in each table the other 2 columns are different in each table are usually difference hence why its not usually just duplicate rows with no new info.

Dale K
  • 25,246
  • 15
  • 42
  • 71
learner
  • 1
  • 2
  • Or is this not what an ER diagram is used for? - Correct, ER diagrams are for showing relationships (by FK) – P.Salmon Aug 24 '22 at 01:31
  • The ERD is to show related entity, in your case between table there is no relation at all which is the FK in one of them. – Taurus Silver Aug 24 '22 at 02:20

0 Answers0