erDiagram
dbo_address {
bigint addressid PK
}
dbo_addresstype {
bigint addresstypeid PK
}
dbo_patient {
bigint patientid PK
}
dbo_patientadditionaladdress {
bigint patientadditionaladdressid PK
bigint addressid FK
bigint addresstypeid FK
bigint patientid FK
bigint secondaryaddresstypeid FK
}
dbo_secondaryaddresstype {
bigint secondaryaddresstypeid PK
}
dbo_address }o..o{ dbo_patientadditionaladdress : "addressid"
dbo_addresstype }o..o{ dbo_patientadditionaladdress : "addresstypeid"
dbo_patient }o..o{ dbo_patientadditionaladdress : "patientid"
dbo_secondaryaddresstype }o..o{ dbo_patientadditionaladdress : "secondaryaddresstypeid"