View Full Version : Database Design


kumaran21
03-07-2011, 05:25 AM
Hi everyone,

I have a question regarding Weak Entities. Can they have attributes from two different Strong Entities?

Example;


TREATMENT (Treatment_ID, Treatment_Type, Treatment_Date)
PATIENT (Patient_SSN, Patient_Name, Disease)

MEDICAL_HISTORY (Patient_SSN, Treatment_ID, History)

Treatment and Patient would be Strong Entities and the Medical_History is the Weak Entity.

Is the above example correct?

Thank you.

Red17
04-17-2011, 06:27 PM
What you have with MEDICAL_HISTORY is a typical transaction table where both Patient_SSN and Treatment_ID are foreign keys (linked to other tables).

You have the option of using the combination of these foreign keys to create the primary key for this table (preferred method if this combination is unique within the table) or create a separate primary key within the MEDICAL_HISTORY table (probably using an auto-generated value).