Pharcyde
Arriba Arriba!!!
- Local time
- Today, 15:39
- Joined
- Sep 4, 2003
- Messages
- 116
Problem with PK
I have a problem with repeating data in my tables.
3 tables: Students, Assessments, and StudentsToAssessment.
with the following keys: Students: StudID, Assessments: AssessID, StudentToAssessments: StudID&AssessID
This is correct for normalisation, but causes problems when putting in assessment results:
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
i.e
StudID - AssessID - Result
123 - Exam - Fail
123 - Exam - Pass
Wont work because it causes a duplicate value, fair enough. I can see that
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
Problem being I'm not sure how to get past this because a student can pass/fail an exam. When failed he can resits however many times....
How do I sort this? Cheers, Lee
I have a problem with repeating data in my tables.
3 tables: Students, Assessments, and StudentsToAssessment.
with the following keys: Students: StudID, Assessments: AssessID, StudentToAssessments: StudID&AssessID
This is correct for normalisation, but causes problems when putting in assessment results:
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
i.e
StudID - AssessID - Result
123 - Exam - Fail
123 - Exam - Pass
Wont work because it causes a duplicate value, fair enough. I can see that
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
Problem being I'm not sure how to get past this because a student can pass/fail an exam. When failed he can resits however many times....
How do I sort this? Cheers, Lee