Tables as relations in ER diagrams
Posted
by Richard Mar.
on Stack Overflow
See other posts from Stack Overflow
or by Richard Mar.
Published on 2010-06-14T19:52:43Z
Indexed on
2010/06/14
20:02 UTC
Read the original article
Hit count: 320
database
|database-design
Assume I have the following tables (**bold**
- primary key, *italics*
- foreign key):
patient(**patient_id**, name)
disease(**disease_id**, name)
patient_disease(**p_d_id**, *patient_id*, *disease,_id* )
I want to draw the ER diagram for this. My idea is to make two entities, one for patient and one for disease, then make a n-to-n relation between them, with p_d_id as its attribute. Is that how it's supposed to be?
© Stack Overflow or respective owner