Thanks, jya.
Thanks, jya.
If I were to do it...
Patient
PatID--PK (primary key)
Physician
PhysID--PK
Appoinment
ApptID--PK
PatID--FK (foreign key)
PhysID--FK
Ailment
AilmtId--PK
Appoinment Detail
ApptDetID--PK
AppID--FK
AilmtID--FK
I wouldn't put PatID under Physician or Ailment. Appointment links the Patient with the Physician. Appointment Details allows for multiple ailments for one appointment. Any information that is specific to the appointment belong either in Appointment or Appointment Detail.