Relationship and referential integrity

augie0216

New member
Local time
Yesterday, 18:59
Joined
Jun 19, 2006
Messages
7
Being as how I'm new in using Access I need some guidance. I have three tables I've set up my relationships as follows:

tblPatient tblContact tblPhone
PatientID PK ContactID PK PhoneID PK
PatientAccount FK PatientID FK PatientID FK
PatientFirstName ConatctFirstName ContactID
PatientLastName ContactLastName
DOB
Address
City
State
Zip
Intial Visit

I have set up a 1 to many between tblPatient PatientID and tblContact PatientID.

and a 1 to many between tblContact ContactID and tblPhone ConatctID

I have given each table referential integrity, to mine understanding in short it means change it in one table it changes in all tables. Please let me know if I'm headind in the right or wrong direction the way I have this set up.
 
It's hard to say without a better understanding of the discourse but you do appear to be on the right track.
 
I have given each table referential integrity, to mine understanding in short it means change it in one table it changes in all tables.
That's not what RI is for. RI prevents the creation of orphan records either by adding records with invalid values in their foreign key fields or by deleting parent records when there are child records in a related table. The CascadeUpdate option is used to propagate a change to the primary key value of the parent table to the foreign key fields in related child tables.

Take a look at this article from the Microsoft KB. It may help to enlighten you.

http://support.microsoft.com/kb/304467/EN-US/
 
Last edited:

Users who are viewing this thread

Back
Top Bottom