G
Guest
I have made two tables for my database. One is Patient demographic data which
has fields like
#Patient ID which is an autonumber and the primary key
#Name
#Address
#Home Phone
#OfficePhone
etc. ( please note I am not using the # sign inside the table. This is only
for your reference)
The second table is "Admission Table" which has the following fields
#Admission ID which again is the primary key and an autonumber
#DateOfAdmission
#DateOfDischarge
#Diagnosis1
#Diagnosis2
#Diagnosis3
etc.
Now one patient can have only one record in the demographic table as one
record will be unique per patient but he can get admitted many times. So he
can have multiple records in the admission table. So to link the two tables I
have added
#Admission ID in the demographic table as a number field and not a primary
field.
Now when I join these two fields between these two tables i.e.,
#Admission ID I get a one to many relationship by access which is
One ---> "Admission Table" and Many ----> "Demographic table"
I want it the other way round.
Where am i going wrong?
Also should I enforce referential integrity or not ?
Thanks for your time !
Dr Alok Modi MD
has fields like
#Patient ID which is an autonumber and the primary key
#Name
#Address
#Home Phone
#OfficePhone
etc. ( please note I am not using the # sign inside the table. This is only
for your reference)
The second table is "Admission Table" which has the following fields
#Admission ID which again is the primary key and an autonumber
#DateOfAdmission
#DateOfDischarge
#Diagnosis1
#Diagnosis2
#Diagnosis3
etc.
Now one patient can have only one record in the demographic table as one
record will be unique per patient but he can get admitted many times. So he
can have multiple records in the admission table. So to link the two tables I
have added
#Admission ID in the demographic table as a number field and not a primary
field.
Now when I join these two fields between these two tables i.e.,
#Admission ID I get a one to many relationship by access which is
One ---> "Admission Table" and Many ----> "Demographic table"
I want it the other way round.
Where am i going wrong?
Also should I enforce referential integrity or not ?
Thanks for your time !
Dr Alok Modi MD