Drop Table
Support Forum for database administrators and web based access to important newsgroups related to databasesI am new to developing a Many-to-Many DB. The current design includes: tbl _patient, tbl_patient_visit, tbl_visit, and multiple assessments such as tbl _vital_signs, tbl_family_history and etc. The PK in tbl_patient is pt_id with a FK in tbl_patient_visit being pt_id. Additionally, the PK in tbl_visit is v_id with a corresponding FK in tbl_pat ient_visit. Furthermore, the various assessment foreign keys are in the tbl _Visit with a separate table for each assessment. All PKs are "auto numbers" with cascadeing foreign key. However, the foreign key field in the child table does not update automatica lly. It has been recommended that I provide a trigger to maintain this func tion. I can understand using a trigger, however, I then have a problem with the tb l_visit, which has all the assessments referenced as a forein key. I expect that all assessments would need to be completed at each visit in order for a row in the tbl_visit to update. This is a problem because not all assessm ents are completed at each visit. My thought was to make the FK "NULL", how ever the PK is an autonumber and must match in that it does not allow null. Your assistance in this matter is much appreciated.
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread